Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- discord command !play <text>:
- aliases: p
- trigger:
- purge the event-message with "TriX Musique"
- if arg 1 is set:
- if voice channel of event-member isn't set:
- make embed:
- set color of embed to color from rgb 147, 32, 224
- set description of embed to "**Tu ne peux pas mettre de la musique si tu n'es pas dans un channel vocal.**"
- set the timestamp of embed to now
- send the last created embed to event-member with "TriX Musique"
- stop
- else if {musique::mise} is true:
- make embed:
- set color of embed to color from rgb 147, 32, 224
- set description of embed to "**Une musique est déjà en cours, pour l'arrêter fait `!stop`.**"
- set the timestamp of embed to now
- send the last created embed to event-member with "TriX Musique"
- stop
- else 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::*}
- set {musique::mise} to true
- create embed:
- set the title of embed to "En train d'écouter"
- 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 "TriX Musique"
- else:
- search youtube for arg-1 and store the results in {_results::*}
- purge the event-message with "TriX Musique"
- if {_results::*} is set:
- join voice channel of event-member
- play {_results::1}
- set {musique::mise} to true
- create embed:
- set the title of embed to "En train d'écouter:"
- 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 "TriX Musique"
- else:
- create embed:
- set the title of embed to "Musique non trouvée."
- 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 "TriX Musique"
- else:
- make embed:
- set color of embed to color from rgb 147, 32, 224
- set description of embed to "**Utilise le nom d'une musique ou l'URL YouTube.**"
- send the last created embed to event-member with "TriX Musique"
- send the last created embed to event-member with "TriX Musique"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement