fix message editing causing crashes
This commit is contained in:
parent
9ee00391dd
commit
6195a8646b
1 changed files with 3 additions and 3 deletions
|
@ -57,10 +57,10 @@ for (const file of fs.readdirSync(resolve(__dirname, "modules"))) {
|
|||
bot.on("messageCreate", async (msg) => {
|
||||
await CommandDispatcher(msg);
|
||||
});
|
||||
bot.on("messageUpdate", (oldMsg, newMsg) => {
|
||||
bot.on("messageUpdate", (msg, oldMsg) => {
|
||||
const oneDay = Date.now() - 86400000;
|
||||
if (newMsg.timestamp > oneDay && !newMsg.hasRan && oldMsg.content !== newMsg.content) {
|
||||
CommandDispatcher(newMsg);
|
||||
if (msg.timestamp > oneDay && !msg.hasRan && oldMsg.content !== msg.content) {
|
||||
CommandDispatcher(msg);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue