diff --git a/commands/admin/activateMusic.js b/commands/admin/activateMusic.js index d261f31..1030337 100644 --- a/commands/admin/activateMusic.js +++ b/commands/admin/activateMusic.js @@ -50,6 +50,7 @@ module.exports = class leave extends Command collector.on('collect', async m => { + collector.stop(); message.delete(); m.message.delete(); }); diff --git a/commands/admin/activateStrikes.js b/commands/admin/activateStrikes.js index da97c1b..7b87f62 100644 --- a/commands/admin/activateStrikes.js +++ b/commands/admin/activateStrikes.js @@ -49,6 +49,7 @@ module.exports = class leave extends Command collector.on('collect', async m => { + collector.stop(); message.delete(); m.message.delete(); }); diff --git a/commands/admin/createchannel.js b/commands/admin/createchannel.js index 479ad15..36ee8ef 100644 --- a/commands/admin/createchannel.js +++ b/commands/admin/createchannel.js @@ -56,6 +56,7 @@ const {EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, collector.on('collect', async m => { + collector.stop(); message.delete(); m.message.delete(); }); diff --git a/commands/admin/createvoicechannel.js b/commands/admin/createvoicechannel.js index c113728..24f0aac 100644 --- a/commands/admin/createvoicechannel.js +++ b/commands/admin/createvoicechannel.js @@ -74,6 +74,7 @@ const {EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, }); collector.on('collect', async m => { + collector.stop(); message.delete(); m.message.delete(); }); diff --git a/commands/admin/guilds.js b/commands/admin/guilds.js index 153373c..c999bc8 100644 --- a/commands/admin/guilds.js +++ b/commands/admin/guilds.js @@ -49,6 +49,7 @@ class Guilds extends Command collector.on('collect', async m => { + collector.stop(); message.delete(); m.message.delete(); }); diff --git a/commands/admin/purge.js b/commands/admin/purge.js index c11eb56..40a9d76 100644 --- a/commands/admin/purge.js +++ b/commands/admin/purge.js @@ -73,6 +73,7 @@ const {Command} = require('../../lib.js') collector.on('collect', async m => { + collector.stop(); message.delete(); m.message.delete(); }); diff --git a/commands/admin/removePersonalData.js b/commands/admin/removePersonalData.js index f3bfffa..3f6c587 100644 --- a/commands/admin/removePersonalData.js +++ b/commands/admin/removePersonalData.js @@ -88,8 +88,9 @@ const strikeM = require('../../models/strikes'); collector.on('collect', async m => { if(m.user.id !== author.id) return m.reply({content:'You are not the requester.', ephemeral:true}) - m.message.delete(); if(m.customId.includes('decline')) return; + collector.stop(); + m.message.delete(); let strokedID; let strikerID = strokedID = author.id; for(let i = 0; i { + collector.stop(); message.delete(); m.message.delete() }); diff --git a/commands/admin/resetFeedChannel.js b/commands/admin/resetFeedChannel.js index 0cecd78..5eeb173 100644 --- a/commands/admin/resetFeedChannel.js +++ b/commands/admin/resetFeedChannel.js @@ -43,6 +43,7 @@ class setYTFeed extends Command{ const collector = message.channel.createMessageComponentCollector({ filter, time: 60000 }); collector.on('collect', async m => { + collector.stop(); _delete(message, m); }); collector.on('end', async m=> diff --git a/commands/admin/setFeedId.js b/commands/admin/setFeedId.js index a4874e4..2c2ea09 100644 --- a/commands/admin/setFeedId.js +++ b/commands/admin/setFeedId.js @@ -48,6 +48,7 @@ class setYTFeed extends Command{ const collector = message.channel.createMessageComponentCollector({ filter, time: 60000 }); collector.on('collect', async m => { + collector.stop(); _delete(message, m); }); collector.on('end', async m=> diff --git a/commands/admin/setFreeGamesChannel.js b/commands/admin/setFreeGamesChannel.js index c5fb97f..427d0a4 100644 --- a/commands/admin/setFreeGamesChannel.js +++ b/commands/admin/setFreeGamesChannel.js @@ -68,6 +68,7 @@ class setfreegameschannel extends Command{ const collector = message.channel.createMessageComponentCollector({ filter, time: 60000 }); collector.on('collect', async m => { + collector.stop(); message.delete(); m.message.delete() }); diff --git a/commands/admin/setRoleRule.js b/commands/admin/setRoleRule.js index 8f8ae09..fb6dd55 100644 --- a/commands/admin/setRoleRule.js +++ b/commands/admin/setRoleRule.js @@ -51,6 +51,7 @@ class setrustcommitschannel extends Command{ const collector = message.channel.createMessageComponentCollector({ filter, time: 60000 }); collector.on('collect', async m => { + collector.stop(); _delete(message, m); }); collector.on('end', async m=> diff --git a/commands/admin/strike.js b/commands/admin/strike.js index 8c65c91..67c31d7 100644 --- a/commands/admin/strike.js +++ b/commands/admin/strike.js @@ -23,6 +23,9 @@ const strikeM = require('../../models/strikes'); var confirm = await this.confirmArgs(message,args); if(confirm=='Error') return new ErrorMessage(this.client).send(ErrorType.Arguments, message, ['Use the mention method to pass the user.', 'Make sure you provide a reason.','Make sure to only mention one person per strike.']) const Stroked = message.mentions.users.toJSON()[0]; + + //! This gotta be encrypted. + var strike = new strikeM(); strike.strikerID = message.author.id; strike.strikerName = message.author.username; @@ -67,6 +70,7 @@ const strikeM = require('../../models/strikes'); collector.on('collect', async m => { m.message.delete() + collector.stop(); }); collector.on('end', async ()=> { diff --git a/commands/music/play.js b/commands/music/play.js index b060c14..90e5671 100644 --- a/commands/music/play.js +++ b/commands/music/play.js @@ -120,6 +120,7 @@ module.exports = class play extends Command collector.on('collect', async m => { // console.log(m) + collector.stop(); message.delete(); m.message.delete(); if(m.customId != 'PlayUserChoice') diff --git a/commands/random/reminder.js b/commands/random/reminder.js index 935ccf0..1bfc6b6 100644 --- a/commands/random/reminder.js +++ b/commands/random/reminder.js @@ -58,6 +58,7 @@ var Job = require('cron').CronJob; collector.on('collect', async m => { if(m.customId[m.customId.length-1]==1) timer.stop(); + collector.stop(); message.delete(); m.message.delete(); }); diff --git a/commands/search/searchAnime.js b/commands/search/searchAnime.js index 873e99c..4456cc2 100644 --- a/commands/search/searchAnime.js +++ b/commands/search/searchAnime.js @@ -54,6 +54,7 @@ class anime extends Command{ const collector = message.channel.createMessageComponentCollector({ filter, time: 60000 }); collector.on('collect', async m => { + collector.stop(); message.delete(); m.message.delete(); if(m.customId[m.customId.length-1]!=4) sendMessage(data[m.customId[m.customId.length-1]].id); @@ -108,6 +109,7 @@ class anime extends Command{ const collector = message.channel.createMessageComponentCollector({ filter, time: 60000 }); collector.on('collect', async m => { + collector.stop(); m.message.delete(); }); collector.on('end', async ()=> diff --git a/commands/search/searchChar.js b/commands/search/searchChar.js index 649b4cc..a7b1ed3 100644 --- a/commands/search/searchChar.js +++ b/commands/search/searchChar.js @@ -55,6 +55,7 @@ class char extends Command{ const collector = message.channel.createMessageComponentCollector({ filter, time: 60000 }); collector.on('collect', async m => { + collector.stop(); message.delete(); m.message.delete(); if(m.customId[m.customId.length-1]!=4) sendMessage(data[m.customId[m.customId.length-1]].id); @@ -100,6 +101,7 @@ class char extends Command{ const collector = message.channel.createMessageComponentCollector({ filter, time: 60000 }); collector.on('collect', async m => { + collector.stop(); m.message.delete(); }); collector.on('end', async ()=> diff --git a/commands/search/searchManga.js b/commands/search/searchManga.js index d683cc4..1df740e 100644 --- a/commands/search/searchManga.js +++ b/commands/search/searchManga.js @@ -56,6 +56,7 @@ class manga extends Command{ const collector = message.channel.createMessageComponentCollector({ filter, time: 60000 }); collector.on('collect', async m => { + collector.stop(); message.delete(); m.message.delete(); if(m.customId[m.customId.length-1]!=4) sendMessage(data[m.customId[m.customId.length-1]].id); @@ -96,6 +97,7 @@ class manga extends Command{ const collector = message.channel.createMessageComponentCollector({ filter, time: 60000 }); collector.on('collect', async m => { + collector.stop(); m.message.delete(); }); collector.on('end', async ()=> diff --git a/lib.js b/lib.js index e9a766f..daa1b53 100644 --- a/lib.js +++ b/lib.js @@ -550,6 +550,7 @@ class ErrorMessage collector.on('collect', async m => { + collector.stop(); message.delete().then(()=>m.message.delete()) .catch(()=>m.message.delete()); });