Showing name of audio hook in chat

PhantomBot Version: 2.4.2 (Revision: 5c75a7b2)

Operating System: Windows 10

Java Version: 1.8.0_161-b12
Browser and Version (for Panel Support): Chrome Version 71.0.3578.98 (Official Build) (64-bit)
Stock PhantomBot: No (added custom adventures)

Let us know what help you need:

Is there a way to show what audio hook is playing in chat? I have a danceparty command that reads a random line from a .txt file and plays that audiohook back. Is there a way I can show in chat which audiohook it’s now playing?

Can you show us what your existing command(s) look like?

Certainly! I have a text file called danceparty.txt. It has names of the songs it can choose from that are the same names as they are in the audio hooks folder:

ATCAroundTheWorld
AviciiWakeMeUp
CCMusicFactoryGonnaMakeYouSweatEverybodyDanceNow
CaravanPalaceLoneDigger
CarlyRaeJepsenIReallyLikeYou
Eiffel65BlueDaBaDee
Eiffel65MoveYourBody
GLORYHAMMERAngusMcFife
IconaPopAllNight
IconaPopILoveIt
IconaPopWeGotTheWorld
KeshaDieYoung
KNOWERTheGovernmentKnows
NSYNCByeByeBye
TheLivingTombstoneSpookyScarySkeletonsRemix

My command is “!danceparty” and the response is: (playsound (readfilerand danceparty.txt))

I have the browser source in SLOBS all set up and it works great, but I just want it to show which song it’s playing in chat.

Bump?

You need a custom script for this, I believe.

Or some complex runCode but yeah a custom script would make this a breeze.

Sweet! Does anyone have any good resources into learning this, or is it all in the documentation?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.