diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-06-19 16:43:37 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-06-19 16:43:37 -0400 |
commit | ea64ebfff9aae32deb036643422d3427959dcd24 (patch) | |
tree | 5ab83558642bad282515837424637070f547a05e /src/commands/moderation/kick.ts | |
parent | d055e0dbb86ef7fd4ee96a1531b51181e825fb4b (diff) | |
download | tanzanite-ea64ebfff9aae32deb036643422d3427959dcd24.tar.gz tanzanite-ea64ebfff9aae32deb036643422d3427959dcd24.tar.bz2 tanzanite-ea64ebfff9aae32deb036643422d3427959dcd24.zip |
feat(*): A bunch of stuff
- Remade logging
- updated dependencies
- started adding custom crap to the command handler
- added emojis to stuff
- can't remeber other stuff
Note: this is currently broken
BREAKING CHANGE:
Diffstat (limited to 'src/commands/moderation/kick.ts')
-rw-r--r-- | src/commands/moderation/kick.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index eed0122..7bd53e0 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -71,14 +71,14 @@ export default class KickCommand extends BushCommand { }); await modlogEnry.save(); } catch (e) { - console.error(e); - yield 'Error saving to database. Please report this to a developer.'; + this.client.console.error(`BanCommand`, `Error saving to database. ${e?.stack}`); + yield `${this.client.util.emojis.error} Error saving to database. Please report this to a developer.`; return; } try { await user.send(`You were kicked in ${message.guild.name} with reason \`${reason || 'No reason given'}\``); } catch (e) { - yield 'Error sending message to user'; + yield `${this.client.util.emojis.warn} Unable to dm user`; } try { await user.kick( @@ -87,11 +87,11 @@ export default class KickCommand extends BushCommand { }` ); } catch { - yield 'Error kicking :/'; + yield `${this.client.util.emojis.error} Error kicking :/`; await modlogEnry.destroy(); return; } - yield `Kicked <@!${user.id}> with reason \`${reason || 'No reason given'}\``; + yield `${this.client.util.emojis.success} Kicked <@!${user.id}> with reason \`${reason || 'No reason given'}\``; } async exec(message: Message, { user, reason }: { user: GuildMember; reason?: string }): Promise<void> { |