Partials and Intents Fix
This commit is contained in:
@@ -29,6 +29,12 @@ let lastPostId = null;
|
||||
|
||||
|
||||
const client = new Discord.Client({
|
||||
partials: [
|
||||
Discord.Partials.Channel,
|
||||
Discord.Partials.Reaction,
|
||||
Discord.Partials.Message,
|
||||
Discord.Partials.User
|
||||
],
|
||||
intents: [
|
||||
Discord.GatewayIntentBits.Guilds,
|
||||
Discord.GatewayIntentBits.GuildMembers,
|
||||
@@ -428,6 +434,7 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user