Skip to content

Commit 6e681e5

Browse files
authored
Catches too many reactions error
Catches Maximum number of reactions reached (20) error by checking for error code 30010
1 parent feeb048 commit 6e681e5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backend/src/plugins/ReactionRoles/util/applyReactionRoleReactionsToMessage.ts

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ export async function applyReactionRoleReactionsToMessage(
8787
body: `Error ${e.code} while applying reaction role reactions to ${channelId}/${messageId}: ${e.message}`,
8888
});
8989
break;
90+
} else if (e.code === 30010) {
91+
errors.push(`Maximum number of reactions reached (20)`);
92+
logs.logBotAlert({
93+
body: `Error ${e.code} while applying reaction role reactions to ${channelId}/${messageId}: ${e.message}`,
94+
});
95+
break;
9096
}
9197
}
9298

0 commit comments

Comments
 (0)