• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

EN [Request] Youtube blacklist

Status
Not open for further replies.

xmark95

Member
Hi would it be possible to create a script to blacklist certain youtube links, some users like to play stupid things on the bot and it becomes quite irritating.

If you do could !blacklist http://www.youtube.com/watch?12345 and it would then instantly skip the song or block it from playing that would be perfect!
 

kanalumaddela

Insider
Insider
The nasty way to do it would be to have a script that gets the portion of the YouTube url with the ID of the video and compare it to an array set in the script options for a matching ID. If it matches, then it'll skip the song or not play at all.

If you had a user who had full playback of the bot (through the built in permissions), then the song would skip since the script cannot stop a command which is built in and granted to a user. If you had a script control use can use the bot, then it just wouldn't play at all.

A final idea which IMO would be the best is to have the script control permissions and use YouTube's API to get the title of a video. Then it'll check the title for a list of keywords (ex: 10 hours, ear rape, etc.) and if there's a match it won't play.

I can code it the first option, but it'll be a while till I'm home.
 
Status
Not open for further replies.
Top