More fixes, waitForInteraction (replacement for waitForReaction)
This commit is contained in:
parent
edcfd2333f
commit
d0c6e6f411
13 changed files with 135 additions and 50 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue