diff options
Diffstat (limited to 'src/listeners/bush')
-rw-r--r-- | src/listeners/bush/appealListener.ts | 19 | ||||
-rw-r--r-- | src/listeners/bush/joinAutoBan.ts | 2 | ||||
-rw-r--r-- | src/listeners/bush/supportThread.ts | 2 | ||||
-rw-r--r-- | src/listeners/bush/userUpdateAutoBan.ts | 2 |
4 files changed, 12 insertions, 13 deletions
diff --git a/src/listeners/bush/appealListener.ts b/src/listeners/bush/appealListener.ts index b50b3c5..64979b5 100644 --- a/src/listeners/bush/appealListener.ts +++ b/src/listeners/bush/appealListener.ts @@ -36,10 +36,7 @@ export default class AppealListener extends BushListener { .setTitle( `${message.embeds[0].fields!.find((f) => f.name === 'What type of punishment are you appealing?')!.value} appeal` ) - .addFields({ - name: '» User Information', - value: 'Unable to fetch author, ID was likely invalid' - }) + .addFields([{ name: '» User Information', value: 'Unable to fetch author, ID was likely invalid' }]) ] }); @@ -70,12 +67,14 @@ export default class AppealListener extends BushListener { if (member.roles.cache.size > 1) UserInfoCommand.generateRolesField(embed, member); } - embed.addFields({ - name: '» Latest Modlogs', - value: latestModlogs.length - ? latestModlogs.map((ml) => ModlogCommand.generateModlogInfo(ml, false)).join(ModlogCommand.separator) - : 'No Modlogs Found' - }); + embed.addFields([ + { + name: '» Latest Modlogs', + value: latestModlogs.length + ? latestModlogs.map((ml) => ModlogCommand.generateModlogInfo(ml, false)).join(ModlogCommand.separator) + : 'No Modlogs Found' + } + ]); await thread.send({ embeds: [embed] }); } diff --git a/src/listeners/bush/joinAutoBan.ts b/src/listeners/bush/joinAutoBan.ts index c258877..0b38766 100644 --- a/src/listeners/bush/joinAutoBan.ts +++ b/src/listeners/bush/joinAutoBan.ts @@ -21,7 +21,7 @@ export default class JoinAutoBanListener extends BushListener { if (eval(code)) { const res = await member.bushBan({ reason: '[AutoBan] Impersonation is not allowed.', - moderator: member.guild.me! + moderator: member.guild.members.me! }); if (!['success', 'failed to dm'].includes(res)) { diff --git a/src/listeners/bush/supportThread.ts b/src/listeners/bush/supportThread.ts index 23c1e44..2eb8dc9 100644 --- a/src/listeners/bush/supportThread.ts +++ b/src/listeners/bush/supportThread.ts @@ -32,7 +32,7 @@ export default class SupportThreadListener extends BushListener { assert(message.channel instanceof BushTextChannel); - if (!message.channel.permissionsFor(message.guild.me!).has(PermissionFlagsBits.CreatePublicThreads)) return; + if (!message.channel.permissionsFor(message.guild.members.me!).has(PermissionFlagsBits.CreatePublicThreads)) return; const thread = await message .startThread({ name: `Support - ${message.author.username}#${message.author.discriminator}`, diff --git a/src/listeners/bush/userUpdateAutoBan.ts b/src/listeners/bush/userUpdateAutoBan.ts index e3fba02..68dfa38 100644 --- a/src/listeners/bush/userUpdateAutoBan.ts +++ b/src/listeners/bush/userUpdateAutoBan.ts @@ -27,7 +27,7 @@ export default class UserUpdateAutoBanListener extends BushListener { const res = await member.bushBan({ reason: '[AutoBan] Impersonation is not allowed.', - moderator: member.guild.me! + moderator: member.guild.members.me! }); if (!['success', 'failed to dm'].includes(res)) { |