Using the !songrequest command as a performing musician



  • Hello, I am new to Phantombot and I was wondering if there was a way to use the !songrequest command (or any other command) for my music streams. In one stream, I would like the !songrequest command to simply make a list of songs that people request without it playing a youtube video and without it showing the “Youtube player is not connected” dialogue. It would be great if I could show on my stream what the current song is and who requested it, but I don’t know if that is possible. On another stream, I would like to enable to youtube player so that I can play along to the songs that are requested with !songrequest. Finally, I would like the command to cost points, but I’m pretty sure that I know how to do that.

    How do you think I should set up !songrequest to accomplish this? Thank you for your help!



  • Ok, so I figured out I could go to Audio->Youtube player in the control panel and just mute/pause the video and that would solve my first question. However, I would still like to know if I could show the play list on the stream rather than just in the chat.


  • Bot Developer

    @PercussiveEvent By default the song-request module will print the current song playing to a text file located in botfolder/addons/youtubePlayer, which then you can use your broadcasting software to read that file. There’s no way to make a of specific songs that users can request, one of the reasons is there’s no way to show that list to users. Your last request is how the current song-request module works on every bot out there. You can use !pricecom to set a cost on the command.



  • Sorry about that, I wasn’t clear. I meant that I would like to show the viewers the queue list after people have used !songrequest so they can see where their song is in the lineup. It already says what position their song is in the queue in chat but I was wondering if there was a text file or way to show what users have submitted for the !songrequest command.

    The current song text file is very helpful! Is there any way that I could include the user that requested the song as well?


  • Bot Developer

    @PercussiveEvent As of right now there’s no way to show a list, unless you just use a window capture of the playlist on the web panel.

    As for your last request this topic might help you: https://community.phantombot.tv/topic/1852/songrequest-currontsong-txt-requester



  • Awesome! Thank you so much! I think a window capture would work well and that other topic is exactly what I’m looking for. One more thing, how do I disable the default playlist so that people would only see the song request queue?



  • Also, I ran into a problem of the current song text file showing the title of the song that the youtube search came up with, not the title that the user used for !songrequest. The results were pretty hilarious with the !songrequest “Hop” showing up as “Hop 10 minute free preview”. Is there was a way that current song.txt would only show what the user put in for !songrequest?

    I was thinking of letting mods/administrators approve the songrequest before they go through. I can do that in the Commands->Permissions tab and set songrequest to mod or admin right? Or would this make it so that only mods could use the command?


  • Bot Developer

    @PercussiveEvent That would make it so only mods can use it. There’s no approving song feature. The only way to remove the default playlist is to remove the songs from it, which if I remember there always needs to be a song playing or the songrequest won’t work and you will have to manually hit the play button.



  • Is there a way to make the !songrequest feature only show what the user’s typed in the currentsong.txt file, instead of showing the search result for what the user typed in? Or could I set something like that up with an entirely different command? I think I am looking for something very similar to the !joinqueue function except I would like to change the wording of some terms.


  • Bot Developer

    @PercussiveEvent Do you need the queue? If not, change the language files related to the queue to fit your needs perhaps? If I am understand what you are after. If the queue system has what you want, essentially, you could simply change out the wording in the language files and then alias the command to something else that means something more meaningful to you and your chat.



  • @IllusionaryOne I won’t need to use the queue for it’s intended purpose, so I think I will try to change the language files. Do you know where I can find the files to edit? I have highlighted all of the words that I would like to change in the following photo:

    0_1492657118861_!queue changes.PNG

    Also, how much work would it be to change the !joinqueue command to something different like !joinsonglist? Again, thank you so much for all the help!


  • Bot Developer

    @PercussiveEvent Probably not a lot, modify the file scripts/lang/english/systems/systems-queueSystem.js to have the language you want it to have. I recommend making a copy of the file under the scripts/lang/custom directory and editing it there, the bot will load those language settings over the default settings (and when you upgrade you don’t lose your changes).

    If you are in Windows, use an editor like Notepad++ to edit the file. If you put a single quote in between the single quotes that define the string for chat, be sure to put a backslash before it. In other words:

    $.lang.register('something', 'It\'s going to be a long time.');

    You could then !aliascom joinsonglist joinqueue and alias any other commands you want. This would be easier than renaming commands in the scripts, and still provide the experience you are after I think.

    Sadly, I think the “GamerTag:”, for some reason, is hard-coded into the script, and we need to pull that out. For now you can edit:

    scripts/systems/queueSystem.js on line 72 and change the text presented there. I will get a ticket opened for us to get that fully set in the language file.



  • Thank you so much! Hopefully I’ll be able to test this out tomorrow but at the latest I will try this on Friday.



  • This worked beautifully, thank you! Also, when I am testing commands off stream, they won’t cost points correct? I was trying to set up the alias for !joinqueue to cost points but I didn’t know if I should set the command !joinqueue or the alias command !requestsong to cost points. So far neither configuration shows the user being deducted points but I think that is just because I’m off stream.


  • Bot Developer

    @PercussiveEvent The cost is always there, but, casters are immune and you can make moderators immune to command costs (!YourBotName togglepricecommods - Toggles if mods pay for commands. - YourBotName being Your Bot Name, i.e.!illusionarybot) Also, always set the cost on the root command, not the alias. There is an upcoming change (if I remember right) to warm people about that. The bot always looks at the root command for the cost so that people do not have to remember to set a cost for several aliases to a command.


Log in to reply
 

Looks like your connection to PhantomBot Community Forums was lost, please wait while we try to reconnect.