Advertisement
Guest User

Untitled

a guest
Jul 15th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. discord command !play <text>:
  2. aliases: p
  3. trigger:
  4. purge the event-message with "TriX Musique"
  5. if arg 1 is set:
  6. if voice channel of event-member isn't set:
  7. make embed:
  8. set color of embed to color from rgb 147, 32, 224
  9. set description of embed to "**Tu ne peux pas mettre de la musique si tu n'es pas dans un channel vocal.**"
  10. set the timestamp of embed to now
  11. send the last created embed to event-member with "TriX Musique"
  12. stop
  13. else if {musique::mise} is true:
  14. make embed:
  15. set color of embed to color from rgb 147, 32, 224
  16. set description of embed to "**Une musique est déjà en cours, pour l'arrêter fait `!stop`.**"
  17. set the timestamp of embed to now
  18. send the last created embed to event-member with "TriX Musique"
  19. stop
  20. else if arg 1 contains "youtube.com" or "youtu.be":
  21. join voice channel of event-member
  22. play arg-1
  23. search youtube for arg-1 and store the results in {_results::*}
  24. set {musique::mise} to true
  25. create embed:
  26. set the title of embed to "En train d'écouter"
  27. set the description of embed to "%{_results::1}%"
  28. set the footer of embed to footer with text "%event-user%"
  29. set the timestamp of embed to now
  30. set the color of embed to green
  31. send the last created embed to event-channel with "TriX Musique"
  32. else:
  33. search youtube for arg-1 and store the results in {_results::*}
  34. purge the event-message with "TriX Musique"
  35. if {_results::*} is set:
  36. join voice channel of event-member
  37. play {_results::1}
  38. set {musique::mise} to true
  39. create embed:
  40. set the title of embed to "En train d'écouter:"
  41. set the footer of embed to footer with text "%event-user%"
  42. set description of embed to "%{_results::1}%"
  43. set the timestamp of embed to now
  44. set the color of embed to green
  45. send the last created embed to event-channel with "TriX Musique"
  46. else:
  47. create embed:
  48. set the title of embed to "Musique non trouvée."
  49. set the footer of embed to footer with text "%event-user%"
  50. set the timestamp of embed to now
  51. set the color of embed to red
  52. send the last created embed to event-channel with "TriX Musique"
  53. else:
  54. make embed:
  55. set color of embed to color from rgb 147, 32, 224
  56. set description of embed to "**Utilise le nom d'une musique ou l'URL YouTube.**"
  57. send the last created embed to event-member with "TriX Musique"
  58. send the last created embed to event-member with "TriX Musique"
  59. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement