/[sudobot]/trunk/src/App.js
ViewVC logotype

Diff of /trunk/src/App.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 33 by rakin, Mon Jul 29 17:28:17 2024 UTC revision 41 by rakin, Mon Jul 29 17:28:19 2024 UTC
# Line 123  class App { Line 123  class App {
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) => {
# Line 151  class App { Line 158  class App {
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);

Legend:
Removed from v.33  
changed lines
  Added in v.41

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26