diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-27 16:57:39 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-27 16:57:39 -0400 |
commit | 877537043dd2a8ba16037f061716d9c6f7a5764a (patch) | |
tree | 9e9fd2c69b415d2f548e97d0d6abbf3bc8a314a8 /src/commands/moderation | |
parent | a1ab06dcfccef90192b90910aecdddbc505eca00 (diff) | |
download | tanzanite-877537043dd2a8ba16037f061716d9c6f7a5764a.tar.gz tanzanite-877537043dd2a8ba16037f061716d9c6f7a5764a.tar.bz2 tanzanite-877537043dd2a8ba16037f061716d9c6f7a5764a.zip |
change printWidth to 130 and update dependecies
Diffstat (limited to 'src/commands/moderation')
-rw-r--r-- | src/commands/moderation/evidence.ts | 9 | ||||
-rw-r--r-- | src/commands/moderation/hideCase.ts | 3 | ||||
-rw-r--r-- | src/commands/moderation/kick.ts | 4 | ||||
-rw-r--r-- | src/commands/moderation/mute.ts | 4 |
4 files changed, 5 insertions, 15 deletions
diff --git a/src/commands/moderation/evidence.ts b/src/commands/moderation/evidence.ts index 0a297de..8dc65f3 100644 --- a/src/commands/moderation/evidence.ts +++ b/src/commands/moderation/evidence.ts @@ -63,17 +63,12 @@ export default class EvidenceCommand extends BushCommand { ) { const entry = await ModLog.findByPk(caseID); if (!entry || entry.pseudo) return message.util.send(`${util.emojis.error} Invalid modlog entry.`); - if (entry.guild !== message.guild!.id) - return message.util.reply(`${util.emojis.error} This modlog is from another server.`); + if (entry.guild !== message.guild!.id) return message.util.reply(`${util.emojis.error} This modlog is from another server.`); if (evidence && (message as BushMessage).attachments?.size) return message.util.reply(`${util.emojis.error} Please either attach an image or a reason not both.`); - const _evidence = evidence - ? evidence - : !message.util.isSlash - ? (message as BushMessage).attachments.first()?.url - : undefined; + const _evidence = evidence ? evidence : !message.util.isSlash ? (message as BushMessage).attachments.first()?.url : undefined; if (!_evidence) return message.util.reply(`${util.emojis.error} You must provide evidence for this modlog.`); const oldEntry = entry.evidence; diff --git a/src/commands/moderation/hideCase.ts b/src/commands/moderation/hideCase.ts index a873784..693197a 100644 --- a/src/commands/moderation/hideCase.ts +++ b/src/commands/moderation/hideCase.ts @@ -38,8 +38,7 @@ export default class HideCaseCommand extends BushCommand { public override async exec(message: BushMessage | BushSlashMessage, { case_id: caseID }: { case_id: string }) { const entry = await ModLog.findByPk(caseID); if (!entry || entry.pseudo) return message.util.send(`${util.emojis.error} Invalid entry.`); - if (entry.guild !== message.guild!.id) - return message.util.reply(`${util.emojis.error} This modlog is from another server.`); + if (entry.guild !== message.guild!.id) return message.util.reply(`${util.emojis.error} This modlog is from another server.`); const action = entry.hidden ? 'no longer hidden' : 'now hidden'; const oldEntry = entry.hidden; entry.hidden = !entry.hidden; diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index 34c1b76..dab6807 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -62,9 +62,7 @@ export default class KickCommand extends BushCommand { const member = await message.guild!.members.fetch(user.id); if (!member) - return await message.util.reply( - `${util.emojis.error} The user you selected is not in the server or is not a valid user.` - ); + return await message.util.reply(`${util.emojis.error} The user you selected is not in the server or is not a valid user.`); if (!message.member) throw new Error(`message.member is null`); const useForce = force && message.author.isOwner(); const canModerateResponse = await Moderation.permissionCheck(message.member, member, 'kick', true, useForce); diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index 844809b..6f594a0 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -69,9 +69,7 @@ export default class MuteCommand extends BushCommand { if (reason.duration === null) reason.duration = 0; const member = await message.guild!.members.fetch(args.user.id).catch(() => null); if (!member) - return await message.util.reply( - `${util.emojis.error} The user you selected is not in the server or is not a valid user.` - ); + return await message.util.reply(`${util.emojis.error} The user you selected is not in the server or is not a valid user.`); if (!message.member) throw new Error(`message.member is null`); const useForce = args.force && message.author.isOwner(); |