Allow reactions on non-cached messages

This commit is contained in:
danbulant 2020-09-06 17:19:19 +02:00
parent 4e41674272
commit bdebc9170e

View file

@ -9,7 +9,10 @@ const client = new discord.Client({
name: "CNMC",
type: "PLAYING"
}
}
},
messageCacheMaxSize: 500,
fetchAllMembers: true,
partials: ["REACTION"]
});
client.on("ready", () => {
@ -58,6 +61,7 @@ async function asyncFilter(arr, predicate) {
}
client.on("messageReactionAdd", async (react, user) => {
var react = await react.fetch();
if(react.message.channel.id !== "750720332943458648") return;
if(user.id === client.user.id) return;
if(!react.message.embeds.length) return;