mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
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 });
|
||||
}
|
||||
} 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) {
|
||||
logger.warn(
|
||||
|
|
Loading…
Add table
Reference in a new issue