Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iscord command !play [<text>]:
- aliases: p
- trigger:
- purge the event-message with event-bot
- 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 channel with id "602816090497613824" with "TriX Musique"
- 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}
- 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 channel with id "602816090497613824" 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 event-bot
- 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
- discord command !stop:
- aliases: s
- trigger:
- purge the event-message with event-bot
- if {musique::mise} is true:
- purge the event-message with event-bot
- set {musique::mise} to false
- make embed:
- set title of embed to title with text "Musique arrêté:"
- if track "TriX Musique" is playing is set:
- set description of embed to discord name of track event-bot is playing
- 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 channel with id "602816090497613824" with "TriX Musique"
- stop the track event-bot is playing
- make "TriX Musique" disconnect from voice
- else if {musique::mise} is false:
- make embed:
- set color of embed to color from rgb 147, 32, 224
- set description of embed to "**Aucune musique en cours.**"
- set the timestamp of embed to now
- send the last created embed to event-member with "TriX Musique"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement