Request function with output into txt file

PhantomBot Version: 3.0.0 (Revision fcc08b51)
OS Version: Windows 10 10.0 (x86)
Java Version: 1.8.0_201-b09
Browser and Version (for Panel Support): Google Chrome 73.0.3683.86
Stock PhantomBot: Yes

Hello everyone!

I want a custom command that gives the viewer the possibility to request a song in guitar hero.

For example:

Username123: !request back in black - acdc
Bot: Username123 requested back in black - acdc

That shouldn’t be to hard to do but i still struggle with it.

I also want the user input in this case “back in black - acdc” to be put into a txt file with the username. That way i have all requests in one central place and i dont have to search my chat for requests.

Example list would look like this

Username123: back in black - acdc
Dude1: taylor swift - ready for it
Gurl27: dragonforce ttfaf

I hope you guys can help me with that :slight_smile:

What you are looking for is mostly documented here: Look at the original post with the custom command using the tag (writefile).

Just change the name of the file being used (don’t use sub.txt, use something that makes sense to you).

So basically:

!addcom herorq You have requested a song! (writefile herorq.txt (sender) (echo))

Now, of course if you want the users to pick from a list of songs then that would need a custom script instead.

Oh wow, that is exactly what i was looking for. Thank you :slight_smile:

1 Like

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