3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-14 21:31:50 +00:00

Catch Too Many Reactions error (#326)

Catches Maximum number of reactions reached (20) error by checking for error code 30010

Co-authored-by: Almeida <github@almeidx.dev>
This commit is contained in:
hawkeye7662 2023-12-29 18:02:48 +05:30 committed by GitHub
parent 1cb8431a02
commit d51461ee3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,6 +86,12 @@ export async function applyReactionRoleReactionsToMessage(
body: `Error ${e.code} while applying reaction role reactions to ${channelId}/${messageId}: ${e.message}`,
});
break;
} else if (e.code === 30010) {
errors.push(`Maximum number of reactions reached (20)`);
logs.logBotAlert({
body: `Error ${e.code} while applying reaction role reactions to ${channelId}/${messageId}: ${e.message}`,
});
break;
}
}