/[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 58 by rakin, Mon Jul 29 17:28:25 2024 UTC revision 61 by rakin, Mon Jul 29 17:28:26 2024 UTC
# Line 95  class Logger { Line 95  class Logger {
95          this.channel(async (channel) => {          this.channel(async (channel) => {
96              let r = '*No reason provided*';              let r = '*No reason provided*';
97    
98                const auditLog = (await ban.guild.fetchAuditLogs({
99                    limit: 1,
100                    type: 'MEMBER_BAN_ADD',
101                })).entries.first();          
102          
103    
104              if (ban.reason) {              if (ban.reason) {
105                  r = ban.reason;                  r = ban.reason;
106              }              }
107                else if (auditLog) {
108                    console.log(auditLog);  
109                    const { target, reason } = await auditLog;
110    
111                    if (target!.id === ban.user.id && reason) {
112                        r = await reason;
113                    }
114                }
115    
116              await channel.send({              await channel.send({
117                  embeds: [                  embeds: [

Legend:
Removed from v.58  
changed lines
  Added in v.61

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26