delete mongo id from imported obj

This commit is contained in:
Erik 2022-04-25 16:24:19 +03:00
parent 7cc253ae26
commit 693c876027
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -65,7 +65,8 @@ class ImportCommand extends SlashCommand {
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);
} }
} }