3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

fetch fix

This commit is contained in:
almeidx 2021-07-29 00:58:11 +01:00
parent cfe3bff742
commit c98de0f554
No known key found for this signature in database
GPG key ID: 8558FBFF849BD664

View file

@ -21,8 +21,9 @@ export async function clearExpiredSlowmodes(pluginData: GuildPluginData<Slowmode
} catch (e) {
logger.error(e);
const realUser =
pluginData.client.users!.fetch(user.user_id as Snowflake) || new UnknownUser({ id: user.user_id });
const realUser = await pluginData.client
.users!.fetch(user.user_id as Snowflake)
.catch(() => new UnknownUser({ id: user.user_id }));
pluginData.state.logs.log(LogType.BOT_ALERT, {
body: `Failed to clear slowmode permissions from {userMention(user)} in {channelMention(channel)}`,