diff --git a/src/index.js b/src/index.js index bce467a..fe198b3 100644 --- a/src/index.js +++ b/src/index.js @@ -59,7 +59,7 @@ bot.on("messageCreate", async (msg) => { }); bot.on("messageUpdate", (msg, oldMsg) => { const oneDay = Date.now() - 86400000; - if (msg.timestamp > oneDay && !msg.hasRan && oldMsg.content !== msg.content) { + if (msg.timestamp > oneDay && !msg.hasRan && oldMsg && oldMsg.content !== msg.content) { CommandDispatcher(msg); } });