Trying a Bug Fix
This commit is contained in:
@@ -465,6 +465,12 @@ client.on(Discord.Events.MessageReactionRemove, async (reaction, user, detail) =
|
|||||||
const emoji = reaction._emoji;
|
const emoji = reaction._emoji;
|
||||||
const emojiId = (emoji.id == null) ? emoji.name : emoji.id;
|
const emojiId = (emoji.id == null) ? emoji.name : emoji.id;
|
||||||
const member = reaction.message.guild.members.cache.get(user.id);
|
const member = reaction.message.guild.members.cache.get(user.id);
|
||||||
|
|
||||||
|
if (!member) {
|
||||||
|
console.error(`Member not found for user ID: ${user.id}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const messageID = reaction.message.id;
|
const messageID = reaction.message.id;
|
||||||
const channelID = reaction.message.channelId;
|
const channelID = reaction.message.channelId;
|
||||||
|
|
||||||
@@ -479,11 +485,11 @@ client.on(Discord.Events.MessageReactionRemove, async (reaction, user, detail) =
|
|||||||
|
|
||||||
// Reaction Role for Wuthering Waves
|
// Reaction Role for Wuthering Waves
|
||||||
if (channelID == "1288545301543518268" && messageID == "1387778040452616294" && emojiId == "✨") {
|
if (channelID == "1288545301543518268" && messageID == "1387778040452616294" && emojiId == "✨") {
|
||||||
member.roles.remove("1288956345386663947");
|
await member.roles.remove("1288956345386663947");
|
||||||
} else if (channelID == 1288545301543518268 && messageID == "1387778040452616294" && emojiId == "💫") {
|
} else if (channelID == 1288545301543518268 && messageID == "1387778040452616294" && emojiId == "💫") {
|
||||||
member.roles.remove("1288954814042083360");
|
await member.roles.remove("1288954814042083360");
|
||||||
} else if (channelID == 1288545301543518268 && messageID == "1387778040452616294" && emojiId == "😂") {
|
} else if (channelID == 1288545301543518268 && messageID == "1387778040452616294" && emojiId == "😂") {
|
||||||
member.roles.remove("1288957389768491028");
|
await member.roles.remove("1288957389768491028");
|
||||||
} else if (channelID == 1288545301543518268 && messageID == "1387778040452616294" && emojiId != "😂") {
|
} else if (channelID == 1288545301543518268 && messageID == "1387778040452616294" && emojiId != "😂") {
|
||||||
reaction.remove();
|
reaction.remove();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user