fetch fix
This commit is contained in:
parent
de7c721c0e
commit
cfe3bff742
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ export async function applyBotSlowmodeToUserId(
|
||||||
await channel.permissionOverwrites.create(userId as Snowflake, { SEND_MESSAGES: false }, { type: 1 });
|
await channel.permissionOverwrites.create(userId as Snowflake, { SEND_MESSAGES: false }, { type: 1 });
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const user = (await pluginData.client.users.fetch(userId as Snowflake)) || new UnknownUser({ id: userId });
|
const user = await pluginData.client.users.fetch(userId as Snowflake).catch(() => new UnknownUser({ id: userId }));
|
||||||
|
|
||||||
if (isDiscordAPIError(e) && e.code === 50013) {
|
if (isDiscordAPIError(e) && e.code === 50013) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
|
|
Loading…
Add table
Reference in a new issue