forked from Galactic/galactic-bot
fix
This commit is contained in:
parent
2af1622892
commit
4ce4ba5713
@ -92,8 +92,8 @@ class MessageLog extends Setting {
|
||||
};
|
||||
|
||||
let hook = await guild.getWebhook(this.name);
|
||||
// Ensure the webhook actually exists
|
||||
hook = await this.client.fetchWebhook(hook.id).catch(() => null);
|
||||
// Ensure the webhook actually exists, the above method my return a cached hook that may not exist on the api
|
||||
if (hook) hook = await this.client.fetchWebhook(hook.id).catch(() => null);
|
||||
|
||||
if (hook) await hook.edit({ channel });
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user