Properly order reaction roles

This commit is contained in:
Dark 2021-06-06 02:41:06 +02:00
parent 7124898568
commit 43c23263f0
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8
7 changed files with 41 additions and 9 deletions

View file

@ -103,6 +103,7 @@ export const InitReactionRolesCmd = reactionRolesCmd({
const progressMessage = msg.channel.send("Adding reaction roles...");
// Save the new reaction roles to the database
let pos = 0;
for (const pair of emojiRolePairs) {
await pluginData.state.reactionRoles.add(
args.message.channel.id,
@ -110,7 +111,9 @@ export const InitReactionRolesCmd = reactionRolesCmd({
pair[0],
pair[1],
args.exclusive,
pos,
);
pos++;
}
// Apply the reactions themselves