Advertisement
KingOfGamesss

Untitled

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