diff --git a/djs-bot/commands/music/247.js b/djs-bot/commands/music/247.js index 2f10b4afa..152602a0c 100644 --- a/djs-bot/commands/music/247.js +++ b/djs-bot/commands/music/247.js @@ -40,7 +40,7 @@ const command = new SlashCommand() ); const twentyFourSeven = player.get("twentyFourSeven"); - if (!twentyFourSeven || twentyFourSeven === false) { + if (!twentyFourSeven) { player.set("twentyFourSeven", true); } else { player.set("twentyFourSeven", false); @@ -66,7 +66,9 @@ const command = new SlashCommand() player.destroy(); } - return interaction.reply({ embeds: [twentyFourSevenEmbed] }); + const ret = await interaction.reply({ embeds: [twentyFourSevenEmbed], fetchReply: true }); + if (ret) setTimeout(() => ret.delete().catch(client.warn), 20000); + return ret; }); module.exports = command; diff --git a/djs-bot/commands/music/autoleave.js b/djs-bot/commands/music/autoleave.js index da1627089..334fc71b3 100644 --- a/djs-bot/commands/music/autoleave.js +++ b/djs-bot/commands/music/autoleave.js @@ -36,7 +36,7 @@ const command = new SlashCommand() const autoLeave = player.get("autoLeave"); player.set("requester", interaction.guild.members.me); - if (!autoLeave || autoLeave === false) { + if (!autoLeave) { player.set("autoLeave", true); } else { player.set("autoLeave", false); @@ -56,7 +56,9 @@ const command = new SlashCommand() }` ); - return interaction.reply({ embeds: [autoLeaveEmbed] }); + const ret = await interaction.reply({ embeds: [autoLeaveEmbed], fetchReply: true }); + if (ret) setTimeout(() => ret.delete().catch(client.warn), 20000); + return ret; }); module.exports = command; diff --git a/djs-bot/commands/music/autopause.js b/djs-bot/commands/music/autopause.js index adafaa14c..7937e38a5 100644 --- a/djs-bot/commands/music/autopause.js +++ b/djs-bot/commands/music/autopause.js @@ -36,7 +36,7 @@ const command = new SlashCommand() const autoPause = player.get("autoPause"); player.set("requester", interaction.guild.members.me); - if (!autoPause || autoPause === false) { + if (!autoPause) { player.set("autoPause", true); } else { player.set("autoPause", false); @@ -56,7 +56,9 @@ const command = new SlashCommand() }` ); - return interaction.reply({ embeds: [autoPauseEmbed] }); + const ret = await interaction.reply({ embeds: [autoPauseEmbed], fetchReply: true }); + if (ret) setTimeout(() => ret.delete().catch(client.warn), 20000); + return ret; }); module.exports = command; diff --git a/djs-bot/commands/music/autoqueue.js b/djs-bot/commands/music/autoqueue.js index f7ff8bbcc..097e0aa76 100644 --- a/djs-bot/commands/music/autoqueue.js +++ b/djs-bot/commands/music/autoqueue.js @@ -39,7 +39,7 @@ const command = new SlashCommand() const autoQueue = player.get("autoQueue"); player.set("requester", interaction.guild.members.me); - if (!autoQueue || autoQueue === false) { + if (!autoQueue) { player.set("autoQueue", true); } else { player.set("autoQueue", false); @@ -55,7 +55,9 @@ const command = new SlashCommand() }`, ); - return interaction.reply({ embeds: [autoQueueEmbed({autoQueue})] }); + const ret = await interaction.reply({ embeds: [autoQueueEmbed({autoQueue})], fetchReply: true }); + if (ret) setTimeout(() => ret.delete().catch(client.warn), 20000); + return ret; }); module.exports = command; diff --git a/djs-bot/commands/music/stop.js b/djs-bot/commands/music/stop.js index 441c2f4fe..41c94ecce 100644 --- a/djs-bot/commands/music/stop.js +++ b/djs-bot/commands/music/stop.js @@ -38,13 +38,17 @@ const command = new SlashCommand() const status = playerUtil.stop(player); - interaction.reply({ + const ret = await interaction.reply({ embeds: [ new EmbedBuilder() .setColor(client.config.embedColor) .setDescription(`:wave: | **Bye Bye!**`), ], + fetchReply: true }); + + if (ret) setTimeout(() => ret.delete().catch(client.warn), 20000); + return ret; }); module.exports = command; diff --git a/djs-bot/package-lock.json b/djs-bot/package-lock.json index 9173f4084..51955002c 100644 --- a/djs-bot/package-lock.json +++ b/djs-bot/package-lock.json @@ -1,12 +1,12 @@ { "name": "discord-musicbot", - "version": "5.4.2", + "version": "5.4.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "discord-musicbot", - "version": "5.4.2", + "version": "5.4.3", "license": "CUSTOM", "dependencies": { "@fastify/cors": "^8.3.0", diff --git a/djs-bot/package.json b/djs-bot/package.json index 933b8b764..b92da68e3 100644 --- a/djs-bot/package.json +++ b/djs-bot/package.json @@ -1,7 +1,7 @@ { "description": "", "main": "index.js", - "version": "5.4.2", + "version": "5.4.3", "name": "discord-musicbot", "scripts": { "guild": "npm run api-build && node scripts/guild",