3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

More fixes, waitForInteraction (replacement for waitForReaction)

This commit is contained in:
Dark 2021-06-02 23:41:05 +02:00
parent 1ee016e85e
commit a07ca88c13
13 changed files with 135 additions and 50 deletions

View file

@ -20,7 +20,10 @@ export async function isBanned(
}
try {
const potentialBan = await Promise.race([pluginData.guild.bans.fetch({ user: userId }), sleep(timeout)]);
const potentialBan = await Promise.race([
pluginData.guild.bans.fetch({ user: userId }).catch(() => null),
sleep(timeout),
]);
return potentialBan != null;
} catch (e) {
if (isDiscordRESTError(e) && e.code === 10026) {