/[sudobot]/trunk/src/automod/Logger.ts
ViewVC logotype

Diff of /trunk/src/automod/Logger.ts

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

revision 37 by rakin, Mon Jul 29 17:28:18 2024 UTC revision 46 by rakin, Mon Jul 29 17:28:21 2024 UTC
# Line 15  class Logger { Line 15  class Logger {
15          }          }
16      }      }
17    
18        channelJoinLeft(callback, msg) {
19            let channelID = app.config.props[msg.guild.id].logging_channel_join_leave;
20            let channel = msg.guild.channels.cache.find(c => c.id === channelID);
21    
22            if (channel) {
23                return callback(channel);
24            }
25        }
26    
27      logEdit(oldMsg, newMsg) {      logEdit(oldMsg, newMsg) {
28          this.channel(async (channel) => {          this.channel(async (channel) => {
29              await channel.send({              await channel.send({
# Line 57  class Logger { Line 66  class Logger {
66                  let str = '';                  let str = '';
67    
68                  msg.attachments.forEach(a => {                  msg.attachments.forEach(a => {
69                      str += `**${a.name}** ${a.proxyURL}\n`;                      str += `**${a.name}** ${a.url}\n`;
70                  });                  });
71    
72                  embed.addField('Attachments', str);                  embed.addField('Attachments', str);
# Line 121  class Logger { Line 130  class Logger {
130      }      }
131    
132      logJoined(member) {      logJoined(member) {
133          this.channel(async (channel) => {          this.channelJoinLeft(async (channel) => {
134              await channel.send({              await channel.send({
135                  embeds: [                  embeds: [
136                      new MessageEmbed()                      new MessageEmbed()
# Line 146  class Logger { Line 155  class Logger {
155      }      }
156    
157      logLeft(member) {      logLeft(member) {
158          this.channel(async (channel) => {          this.channelJoinLeft(async (channel) => {
159              await channel.send({              await channel.send({
160                  embeds: [                  embeds: [
161                      new MessageEmbed()                      new MessageEmbed()

Legend:
Removed from v.37  
changed lines
  Added in v.46

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26