Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- discord command play [<text>]:
- prefixes: .
- bots: WolfNetwork
- executable in: guild
- trigger:
- purge the event-message with event-bot
- if arg 1 is set:
- if arg 1 contains "index" or "start_radio":
- reply with "**.play** **Format is invalid. Use youtube link.** :x:"
- stop
- if arg 1 contains "youtube.com" or "youtu.be":
- join voice channel of event-member
- play arg-1
- search youtube for "%arg-1%" and store the results in {_results::*}
- create embed:
- set the title of embed to "Now plaing"
- set the image of embed to "https://img.youtube.com/vi/%identifier of {music::results::%discord id of event-guild%::1} %/hqdefault.jpg"
- set the description of embed to "%{_results::1}%"
- set the footer of embed to footer with text "%event-user%"
- set the timestamp of embed to now
- set the color of embed to green
- send the last created embed to event-channel with event-bot
- else:
- search youtube for "%arg-1%" and store the results in {_results::*}
- purge the event-message with event-bot
- if {_results::*} is set:
- join voice channel of event-member
- play {_results::1}
- create embed:
- set the title of embed to "Added to queue"
- set the image of embed to "https://img.youtube.com/vi/%identifier of {music::results::%discord id of event-guild%::1} %/hqdefault.jpg"
- set the footer of embed to footer with text "%event-user%"
- set description of embed to "%{_results::1}%"
- set the timestamp of embed to now
- set the color of embed to green
- send the last created embed to event-channel with event-bot
- else:
- create embed:
- set the title of embed to "Track not found"
- set the footer of embed to footer with text "%event-user%"
- set the timestamp of embed to now
- set the color of embed to red
- send the last created embed to event-channel with event-bot
- else:
- reply with "**.play** **Format is invalid. Use track name or youtube link.** :x:"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement