mirror of
https://github.com/danbulant/cnmc-bot
synced 2026-05-19 03:48:33 +00:00
Allow reactions on non-cached messages
This commit is contained in:
parent
4e41674272
commit
bdebc9170e
1 changed files with 5 additions and 1 deletions
6
index.js
6
index.js
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue