mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Remove extraneous reaction removal
The reaction would already be removed at the end of the function
This commit is contained in:
parent
abdf54e134
commit
37fa9c736d
1 changed files with 4 additions and 6 deletions
|
@ -1,7 +1,9 @@
|
||||||
import { reactionRolesEvt } from "../types";
|
import { reactionRolesEvt } from "../types";
|
||||||
import { resolveMember, noop, sleep } from "../../../utils";
|
import { noop, resolveMember, sleep } from "../../../utils";
|
||||||
import { addMemberPendingRoleChange } from "../util/addMemberPendingRoleChange";
|
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 = "❌";
|
const CLEAR_ROLES_EMOJI = "❌";
|
||||||
|
|
||||||
|
@ -33,10 +35,6 @@ export const AddReactionRoleEvt = reactionRolesEvt({
|
||||||
for (const roleId of reactionRoleRoleIds) {
|
for (const roleId of reactionRoleRoleIds) {
|
||||||
addMemberPendingRoleChange(pluginData, userId, "-", roleId);
|
addMemberPendingRoleChange(pluginData, userId, "-", roleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
pluginData.state.reactionRemoveQueue.add(async () => {
|
|
||||||
await msg.channel.removeMessageReaction(msg.id, CLEAR_ROLES_EMOJI, userId);
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
// User reacted with a reaction role emoji -> add the role
|
// User reacted with a reaction role emoji -> add the role
|
||||||
const matchingReactionRole = await pluginData.state.reactionRoles.getByMessageAndEmoji(
|
const matchingReactionRole = await pluginData.state.reactionRoles.getByMessageAndEmoji(
|
||||||
|
|
Loading…
Add table
Reference in a new issue