123 |
}); |
}); |
124 |
|
|
125 |
this.on("messageUpdate", async (oldMessage, newMessage) => { |
this.on("messageUpdate", async (oldMessage, newMessage) => { |
126 |
if (oldMessage.author.bot || oldMessage.content === newMessage.content) |
if (oldMessage.author.bot || !oldMessage.guild || oldMessage.channel.type == 'dm' || oldMessage.content === newMessage.content) |
127 |
return; |
return; |
128 |
|
|
129 |
|
let msg = await this.msg; |
130 |
|
await (this.msg = newMessage); |
131 |
|
|
132 |
|
await this.spamFilter.basic(newMessage); |
133 |
|
await this.messageFilter.start(newMessage, this.commandManager); |
134 |
|
|
135 |
await this.logger.logEdit(oldMessage, newMessage); |
await this.logger.logEdit(oldMessage, newMessage); |
136 |
|
await (this.msg = msg); |
137 |
}); |
}); |
138 |
|
|
139 |
this.on("messageReactionAdd", async (reaction, message) => { |
this.on("messageReactionAdd", async (reaction, message) => { |
158 |
}); |
}); |
159 |
|
|
160 |
this.on("messageDelete", async (message) => { |
this.on("messageDelete", async (message) => { |
161 |
if (message.author.bot) |
if (message.author.bot || !message.guild || message.channel.type == 'dm') |
162 |
return; |
return; |
163 |
|
|
164 |
await this.logger.logDelete(message); |
await this.logger.logDelete(message); |