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: [ |