Remove extraneous reaction removal

The reaction would already be removed at the end of the function
This commit is contained in:
Dragory 2021-04-29 02:34:54 +03:00
parent abdf54e134
commit 37fa9c736d
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -1,7 +1,9 @@
import { reactionRolesEvt } from "../types";
import { resolveMember, noop, sleep } from "../../../utils";
import { noop, resolveMember, sleep } from "../../../utils";
import { addMemberPendingRoleChange } from "../util/addMemberPendingRoleChange";
import { Message } from "eris";
import { DiscordRESTError, Message } from "eris";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { LogType } from "../../../data/LogType";
const CLEAR_ROLES_EMOJI = "❌";
@ -33,10 +35,6 @@ export const AddReactionRoleEvt = reactionRolesEvt({
for (const roleId of reactionRoleRoleIds) {
addMemberPendingRoleChange(pluginData, userId, "-", roleId);
}
pluginData.state.reactionRemoveQueue.add(async () => {
await msg.channel.removeMessageReaction(msg.id, CLEAR_ROLES_EMOJI, userId);
});
} else {
// User reacted with a reaction role emoji -> add the role
const matchingReactionRole = await pluginData.state.reactionRoles.getByMessageAndEmoji(