clear music msg channel on dispatcher end

This commit is contained in:
Emily 2021-03-18 13:44:03 +11:00
parent 479eeeea44
commit 878cab71e6
3 changed files with 5 additions and 0 deletions

View file

@ -10,6 +10,7 @@ module.exports.run = async (client, message, args, level) =>{
guild.paused = false
guild.skippers = []
guild.fixers = []
guild.channel = null
if (guild.dispatcher) {
guild.dispatcher.end('silent')
@ -35,6 +36,7 @@ module.exports.run = async (client, message, args, level) =>{
guild.paused = false
guild.skippers = []
guild.fixers = []
guild.channel = null
if (guild.dispatcher) {
guild.dispatcher.end('silent')

View file

@ -12,6 +12,7 @@ exports.run = async (client, message) => {
guild.paused = false
guild.skippers = []
guild.fixers = []
guild.channel = null
message.channel.send('<:success:466995111885144095> Playback stopped!')
};

View file

@ -104,6 +104,7 @@ exports.play = async function (client, message, query, playNext, ignoreQueue) {
guild.paused = false
guild.skippers = []
guild.fixers = []
guild.channel = null
// music not playing, something is in queue
} else if ((!guild.playing || !guild.dispatcher) && guild.queue.length > 0) {
guild.queue = []
@ -227,6 +228,7 @@ exports.play = async function (client, message, query, playNext, ignoreQueue) {
guild.paused = false
guild.skippers = []
guild.fixers = []
guild.channel = null
connection.disconnect()
}