1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-12-27 04:15:38 -05:00

Workaround for removing a word that doesnt exist

This commit is contained in:
toast-ts 2022-12-29 21:10:56 +11:00
parent 1aada89272
commit 7603d77239

View File

@ -15,8 +15,8 @@ export default {
interaction.reply(`Successfully added \`${word}\` to the list.`)
break;
case 'remove':
if (client.bannedWords._content.includes(!word)) return interaction.reply({content: `\`${word}\` doesn't exist on the list.`, ephemeral: true});
client.bannedWords.removeData(word, 1, 0).forceSave();
if (client.bannedWords._content.includes(word) == false) return interaction.reply({content: `\`${word}\` doesn't exist on the list.`, ephemeral: true});
client.bannedWords.removeData(word, 0, 0).forceSave();
interaction.reply(`Successfully removed \`${word}\` from the list.`)
}
},