Added Reaction Roles
This commit is contained in:
@@ -14,7 +14,8 @@ const { request } = require("node:http");
|
||||
//const { Birthday } = require('./database');
|
||||
|
||||
const Instagram = require('instagram-web-api')
|
||||
const FileCookieStore = require('tough-cookie-filestore2')
|
||||
const FileCookieStore = require('tough-cookie-filestore2');
|
||||
const { channel } = require("node:diagnostics_channel");
|
||||
|
||||
|
||||
const username = config.igusername;
|
||||
@@ -192,7 +193,7 @@ client.on(Events.MessageCreate, async (message) => {
|
||||
});
|
||||
|
||||
client.on(Events.MessageReactionAdd, async (reaction, user, channel) => {
|
||||
if(reaction.message.partial) await reaction.message.fetch();
|
||||
/*if(reaction.message.partial) await reaction.message.fetch();
|
||||
if(reaction.partial) await reaction.fetch();
|
||||
|
||||
if(user.bot) return;
|
||||
@@ -204,7 +205,7 @@ client.on(Events.MessageReactionAdd, async (reaction, user, channel) => {
|
||||
if(reaction.emoji.id === '8789972642138767364') {
|
||||
reaction.message.guild.members.cache.get(user.id).roles.add('8779841244749004804')
|
||||
}
|
||||
}
|
||||
}*/
|
||||
});
|
||||
|
||||
client.on('interactionCreate', async (interaction) => {
|
||||
@@ -417,17 +418,29 @@ client.on(Discord.Events.GuildMemberAdd, (member) => {
|
||||
|
||||
// on Reaction Added
|
||||
client.on(Discord.Events.MessageReactionAdd, async (reaction, user, detail) => {
|
||||
|
||||
const emoji = reaction._emoji;
|
||||
const emojiId = (emoji.id == null) ? emoji.name : emoji.id;
|
||||
const member = reaction.message.guild.members.cache.get(user.id);
|
||||
const messageID = reaction.message.id;
|
||||
const channelID = reaction.message.channel.id;
|
||||
|
||||
member.roles.add(ReactionRole.role);
|
||||
// Reaction Role for Rules
|
||||
if (channelID == 1288527949129318443 && messageID == 1332383887598419968 && emojiId == "🐼") {
|
||||
member.roles.add("1288955703972728984");
|
||||
} else if (channelID == 1288527949129318443 && messageID == 1332383887598419968 && emojiId != "🐼") {
|
||||
reaction.remove();
|
||||
}
|
||||
|
||||
|
||||
// replace with right thing
|
||||
if (ReactionRoleMessage !== undefined) {
|
||||
|
||||
// Reaction Role for Wuthering Waves
|
||||
if (channelID == 1288545301543518268 && messageID == 1387778040452616294 && emojiId == "✨") {
|
||||
member.roles.add("1288956345386663947");
|
||||
} else if (channelID == 1288545301543518268 && messageID == 1387778040452616294 && emojiId == "💫") {
|
||||
member.roles.add("1288954814042083360");
|
||||
} else if (channelID == 1288545301543518268 && messageID == 1387778040452616294 && emojiId == "😂") {
|
||||
member.roles.add("1288957389768491028");
|
||||
} else if (channelID == 1288545301543518268 && messageID == 1387778040452616294 && emojiId != "😂") {
|
||||
reaction.remove();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user