Advertisement
KingOfGamesss

Untitled

Aug 31st, 2019
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. discord command play [<text>]:
  2. prefixes: .
  3. bots: WolfNetwork
  4. executable in: guild
  5. trigger:
  6. purge the event-message with event-bot
  7. if arg 1 is set:
  8. if arg 1 contains "index" or "start_radio":
  9. reply with "**.play** **Format is invalid. Use youtube link.** :x:"
  10. stop
  11. if arg 1 contains "youtube.com" or "youtu.be":
  12. join voice channel of event-member
  13. play arg-1
  14. search youtube for "%arg-1%" and store the results in {_results::*}
  15. create embed:
  16. set the title of embed to "Now plaing"
  17. set the image of embed to "https://img.youtube.com/vi/%identifier of {music::results::%discord id of event-guild%::1} %/hqdefault.jpg"
  18. set the description of embed to "%{_results::1}%"
  19. set the footer of embed to footer with text "%event-user%"
  20. set the timestamp of embed to now
  21. set the color of embed to green
  22. send the last created embed to event-channel with event-bot
  23. else:
  24. search youtube for "%arg-1%" and store the results in {_results::*}
  25. purge the event-message with event-bot
  26. if {_results::*} is set:
  27. join voice channel of event-member
  28. play {_results::1}
  29. create embed:
  30. set the title of embed to "Added to queue"
  31. set the image of embed to "https://img.youtube.com/vi/%identifier of {music::results::%discord id of event-guild%::1} %/hqdefault.jpg"
  32. set the footer of embed to footer with text "%event-user%"
  33. set description of embed to "%{_results::1}%"
  34. set the timestamp of embed to now
  35. set the color of embed to green
  36. send the last created embed to event-channel with event-bot
  37. else:
  38. create embed:
  39. set the title of embed to "Track not found"
  40. set the footer of embed to footer with text "%event-user%"
  41. set the timestamp of embed to now
  42. set the color of embed to red
  43. send the last created embed to event-channel with event-bot
  44. else:
  45. reply with "**.play** **Format is invalid. Use track name or youtube link.** :x:"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement