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/mute.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/mute.ts')
-rw-r--r-- | src/commands/moderation/mute.ts | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index e731e30..40e13e7 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -2,6 +2,7 @@ import { AllowedMentions, BushCommand, Moderation, + muteResponse, type ArgType, type BushMessage, type BushSlashMessage, @@ -99,23 +100,23 @@ export default class MuteCommand extends BushCommand { const prefix = util.prefix(message); const victim = util.format.input(member.user.tag); switch (responseCode) { - case 'missing permissions': + case muteResponse.MISSING_PERMISSIONS: return `${util.emojis.error} Could not mute ${victim} because I am missing the **Manage Roles** permission.`; - case 'no mute role': + case muteResponse.NO_MUTE_ROLE: return `${util.emojis.error} Could not mute ${victim}, you must set a mute role with \`${prefix}config muteRole\`.`; - case 'invalid mute role': + case muteResponse.MUTE_ROLE_INVALID: return `${util.emojis.error} Could not mute ${victim} because the current mute role no longer exists. Please set a new mute role with \`${prefix}config muteRole\`.`; - case 'mute role not manageable': + case muteResponse.MUTE_ROLE_NOT_MANAGEABLE: return `${util.emojis.error} Could not mute ${victim} because I cannot assign the current mute role, either change the role's position or set a new mute role with \`${prefix}config muteRole\`.`; - case 'error giving mute role': + case muteResponse.ACTION_ERROR: return `${util.emojis.error} Could not mute ${victim}, there was an error assigning them the mute role.`; - case 'error creating modlog entry': + case muteResponse.MODLOG_ERROR: return `${util.emojis.error} There was an error creating a modlog entry, please report this to my developers.`; - case 'error creating mute entry': + case muteResponse.PUNISHMENT_ENTRY_ADD_ERROR: return `${util.emojis.error} There was an error creating a punishment entry, please report this to my developers.`; - case 'failed to dm': + case muteResponse.DM_ERROR: return `${util.emojis.warn} Muted ${victim} however I could not send them a dm.`; - case 'success': + case muteResponse.SUCCESS: return `${util.emojis.success} Successfully muted ${victim}.`; } }; |