diff options
author | TymanWasTaken <32660892+tymanwastaken@users.noreply.github.com> | 2021-05-28 22:08:28 -0600 |
---|---|---|
committer | TymanWasTaken <32660892+tymanwastaken@users.noreply.github.com> | 2021-05-28 22:08:28 -0600 |
commit | ee665e568f244e1c465748718691404b7bf6feb0 (patch) | |
tree | 847333085377020969ce13cd6652d8894c503426 /src/commands/moderation/kick.ts | |
parent | 35d8cbda559c479c66800d39535df02c807dc33a (diff) | |
parent | 57de6733b62c83ff197f9236f71545d8ef1e1103 (diff) | |
download | tanzanite-ee665e568f244e1c465748718691404b7bf6feb0.tar.gz tanzanite-ee665e568f244e1c465748718691404b7bf6feb0.tar.bz2 tanzanite-ee665e568f244e1c465748718691404b7bf6feb0.zip |
Merge branch 'rewrite' of github.com:NotEnoughUpdates/bush-bot into rewrite
Diffstat (limited to 'src/commands/moderation/kick.ts')
-rw-r--r-- | src/commands/moderation/kick.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index 182485a..c5581f6 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -46,7 +46,11 @@ export default class KickCommand extends BushCommand { }); } - private async *genResponses(message: Message | CommandInteraction, user: GuildMember, reason?: string): AsyncIterable<string> { + private async *genResponses( + message: Message | CommandInteraction, + user: GuildMember, + reason?: string + ): AsyncIterable<string> { let modlogEnry: Modlog; // Create guild entry so postgres doesn't get mad when I try and add a modlog entry await Guild.findOrCreate({ @@ -77,7 +81,11 @@ export default class KickCommand extends BushCommand { yield 'Error sending message to user'; } try { - await user.kick(`Kicked by ${message instanceof Message ? message.author.tag : message.user.tag} with ${reason ? `reason ${reason}` : 'no reason'}`); + await user.kick( + `Kicked by ${message instanceof Message ? message.author.tag : message.user.tag} with ${ + reason ? `reason ${reason}` : 'no reason' + }` + ); } catch { yield 'Error kicking :/'; await modlogEnry.destroy(); |