aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/kick.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-06 17:02:57 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-06 17:02:57 -0500
commit1a48fd647fc84952439da5484d38f4d16c89198c (patch)
treed2033f7f614ee95013b3abb92b8ad890653d1fee /src/commands/moderation/kick.ts
parente8a55bd9edf535d30171c2f1c7c3cc11b4f7595c (diff)
downloadtanzanite-1a48fd647fc84952439da5484d38f4d16c89198c.tar.gz
tanzanite-1a48fd647fc84952439da5484d38f4d16c89198c.tar.bz2
tanzanite-1a48fd647fc84952439da5484d38f4d16c89198c.zip
fixed some errors, made moderation methods use manual enum thing
Diffstat (limited to 'src/commands/moderation/kick.ts')
-rw-r--r--src/commands/moderation/kick.ts22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts
index 6d96ae9..af486ac 100644
--- a/src/commands/moderation/kick.ts
+++ b/src/commands/moderation/kick.ts
@@ -1,4 +1,12 @@
-import { AllowedMentions, BushCommand, Moderation, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
+import {
+ AllowedMentions,
+ BushCommand,
+ kickResponse,
+ Moderation,
+ type ArgType,
+ type BushMessage,
+ type BushSlashMessage
+} from '#lib';
export default class KickCommand extends BushCommand {
public constructor() {
@@ -68,15 +76,15 @@ export default class KickCommand extends BushCommand {
const responseMessage = (): string => {
const victim = util.format.input(member.user.tag);
switch (responseCode) {
- case 'missing permissions':
- return `${util.emojis.error} Could not kick ${victim} because I am missing the \`Kick Members\` permission.`;
- case 'error kicking':
+ case kickResponse.MISSING_PERMISSIONS:
+ return `${util.emojis.error} Could not kick ${victim} because I am missing the **Kick Members** permission.`;
+ case kickResponse.ACTION_ERROR:
return `${util.emojis.error} An error occurred while trying to kick ${victim}.`;
- case 'error creating modlog entry':
+ case kickResponse.MODLOG_ERROR:
return `${util.emojis.error} While muting ${victim}, there was an error creating a modlog entry, please report this to my developers.`;
- case 'failed to dm':
+ case kickResponse.DM_ERROR:
return `${util.emojis.warn} Kicked ${victim} however I could not send them a dm.`;
- case 'success':
+ case kickResponse.SUCCESS:
return `${util.emojis.success} Successfully kicked ${victim}.`;
}
};