diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-06 17:02:57 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-06 17:02:57 -0500 |
commit | 1a48fd647fc84952439da5484d38f4d16c89198c (patch) | |
tree | d2033f7f614ee95013b3abb92b8ad890653d1fee /src/commands/moderation/unban.ts | |
parent | e8a55bd9edf535d30171c2f1c7c3cc11b4f7595c (diff) | |
download | tanzanite-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/unban.ts')
-rw-r--r-- | src/commands/moderation/unban.ts | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/commands/moderation/unban.ts b/src/commands/moderation/unban.ts index bbce4e0..c939792 100644 --- a/src/commands/moderation/unban.ts +++ b/src/commands/moderation/unban.ts @@ -1,4 +1,12 @@ -import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptionalArgType } from '#lib'; +import { + AllowedMentions, + BushCommand, + unbanResponse, + type ArgType, + type BushMessage, + type BushSlashMessage, + type OptionalArgType +} from '#lib'; export default class UnbanCommand extends BushCommand { public constructor() { @@ -47,17 +55,18 @@ export default class UnbanCommand extends BushCommand { const responseMessage = (): string => { const victim = util.format.input(user.tag); switch (responseCode) { - case 'missing permissions': + case unbanResponse.MISSING_PERMISSIONS: return `${util.emojis.error} Could not unban ${victim} because I am missing the **Ban Members** permission.`; - case 'error unbanning': + case unbanResponse.ACTION_ERROR: return `${util.emojis.error} An error occurred while trying to unban ${victim}.`; - case 'error removing ban entry': + case unbanResponse.PUNISHMENT_ENTRY_REMOVE_ERROR: return `${util.emojis.error} While unbanning ${victim}, there was an error removing their ban entry, please report this to my developers.`; - case 'error creating modlog entry': + case unbanResponse.MODLOG_ERROR: return `${util.emojis.error} While unbanning ${victim}, there was an error creating a modlog entry, please report this to my developers.`; - case 'user not banned': + case unbanResponse.NOT_BANNED: return `${util.emojis.warn} ${victim} is not banned but I tried to unban them anyways.`; - case 'success': + case unbanResponse.DM_ERROR: + case unbanResponse.SUCCESS: return `${util.emojis.success} Successfully unbanned ${victim}.`; } }; |