nullcheck author in reaction event

This commit is contained in:
Cynthia Foxwell 2024-05-17 14:39:14 -06:00
parent ff4615e1aa
commit 4f8340cba7

View file

@ -109,7 +109,7 @@ bot.on("messageUpdate", async (msg, oldMsg) => {
} }
}); });
bot.on("messageReactionAdd", async (msg, reaction, reactor) => { bot.on("messageReactionAdd", async (msg, reaction, reactor) => {
if (msg.author.id !== bot.user.id) return; if (msg?.author?.id !== bot.user.id) return;
if (reaction.name !== "\u274c") return; if (reaction.name !== "\u274c") return;
try { try {