Skip to content

Commit

Permalink
Catch Too Many Reactions error (#326)
Browse files Browse the repository at this point in the history
Catches Maximum number of reactions reached (20) error by checking for error code 30010

Co-authored-by: Almeida <[email protected]>
  • Loading branch information
hawkeye7662 and almeidx authored Dec 29, 2023
1 parent 1cb8431 commit d51461e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit d51461e

Please sign in to comment.