delete mongo id from imported obj
This commit is contained in:
parent
7cc253ae26
commit
693c876027
@ -64,8 +64,9 @@ class ImportCommand extends SlashCommand {
|
|||||||
const hooks = await guild.fetchWebhooks();
|
const hooks = await guild.fetchWebhooks();
|
||||||
const hook = hooks.get(webhook);
|
const hook = hooks.get(webhook);
|
||||||
if(hook) await guild.updateWebhook('messages', hook);
|
if(hook) await guild.updateWebhook('messages', hook);
|
||||||
} else if(version === '3') {
|
} else if (version === '3') {
|
||||||
this.client.storageManager.mongodb.webhooks.updateOne({ feature: 'messages', guild: guild.id }, webhook);
|
delete webhook._id;
|
||||||
|
await this.client.storageManager.mongodb.webhooks.updateOne({ feature: 'messages', guild: guild.id }, webhook);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user