mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 16:30:58 -05:00
ignore error if word doesnt exist
This commit is contained in:
parent
f70cf80ebe
commit
88379e4ab3
@ -8,7 +8,7 @@ export default {
|
|||||||
({
|
({
|
||||||
add: async()=>{
|
add: async()=>{
|
||||||
if (wordExists) return interaction.reply({content: `\`${word}\` is already added.`, ephemeral: true});
|
if (wordExists) return interaction.reply({content: `\`${word}\` is already added.`, ephemeral: true});
|
||||||
await client.bannedWords._content.create({_id:word}).then(a=>a.save());
|
await client.bannedWords._content.create({_id:word}).then(a=>a.save()).catch(e=>{if (e.name == 'No document found for query') return});
|
||||||
interaction.reply(`Successfully added \`${word}\` to the database.`)
|
interaction.reply(`Successfully added \`${word}\` to the database.`)
|
||||||
},
|
},
|
||||||
remove: async()=>{
|
remove: async()=>{
|
||||||
|
Loading…
Reference in New Issue
Block a user