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);
|
let hook = await guild.getWebhook(this.name);
|
||||||
// Ensure the webhook actually exists
|
// Ensure the webhook actually exists, the above method my return a cached hook that may not exist on the api
|
||||||
hook = await this.client.fetchWebhook(hook.id).catch(() => null);
|
if (hook) hook = await this.client.fetchWebhook(hook.id).catch(() => null);
|
||||||
|
|
||||||
if (hook) await hook.edit({ channel });
|
if (hook) await hook.edit({ channel });
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user