Showing name of audio hook in chat

commands
#1

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?

0 Likes

#2

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

0 Likes

#3

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.

0 Likes

#4

Bump?

0 Likes

#5

You need a custom script for this, I believe.

0 Likes

#6

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

0 Likes

#7

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

0 Likes

closed #8

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

0 Likes