aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/massEvidence.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-16 14:32:18 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-16 14:32:18 -0400
commit0e87bbd3940d89defcb04926587b35c8f4d1947f (patch)
treee50860d4dc25a11d4c3977b583284c4bcad1b077 /src/commands/moderation/massEvidence.ts
parent661e4c9935aeb8760dafc7ced4bbec6cc356a033 (diff)
downloadtanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.tar.gz
tanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.tar.bz2
tanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.zip
remove util classes, move config out of src
Diffstat (limited to 'src/commands/moderation/massEvidence.ts')
-rw-r--r--src/commands/moderation/massEvidence.ts29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/commands/moderation/massEvidence.ts b/src/commands/moderation/massEvidence.ts
index 468d43c..ffe85d2 100644
--- a/src/commands/moderation/massEvidence.ts
+++ b/src/commands/moderation/massEvidence.ts
@@ -1,4 +1,16 @@
-import { BushCommand, ModLog, type ArgType, type CommandMessage, type OptArgType, type SlashMessage } from '#lib';
+import {
+ BushCommand,
+ clientSendAndPermCheck,
+ colors,
+ emojis,
+ ModLog,
+ overflowEmbed,
+ regex,
+ type ArgType,
+ type CommandMessage,
+ type OptArgType,
+ type SlashMessage
+} from '#lib';
import assert from 'assert';
import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
import { EvidenceCommand } from '../index.js';
@@ -37,7 +49,7 @@ export default class MassEvidenceCommand extends BushCommand {
quoted: true,
slash: true,
channel: 'guild',
- clientPermissions: (m) => util.clientSendAndPermCheck(m),
+ clientPermissions: (m) => clientSendAndPermCheck(m),
userPermissions: [PermissionFlagsBits.ManageMessages],
lock: 'user'
});
@@ -53,10 +65,9 @@ export default class MassEvidenceCommand extends BushCommand {
if (!evidence) return;
const ids = args.users.split(/\n| /).filter((id) => id.length > 0);
- if (ids.length === 0) return message.util.send(`${util.emojis.error} You must provide at least one user id.`);
+ if (ids.length === 0) return message.util.send(`${emojis.error} You must provide at least one user id.`);
for (const id of ids) {
- if (!client.constants.regex.snowflake.test(id))
- return message.util.send(`${util.emojis.error} ${id} is not a valid snowflake.`);
+ if (!regex.snowflake.test(id)) return message.util.send(`${emojis.error} ${id} is not a valid snowflake.`);
}
const caseMap = (
@@ -78,15 +89,15 @@ export default class MassEvidenceCommand extends BushCommand {
const lines = ids.map((id, i) => {
const case_ = res[i];
- if (!case_) return `${util.emojis.error} ${id} - no case found.`;
- return `${util.emojis.success} ${id} - ${case_.id}`;
+ if (!case_) return `${emojis.error} ${id} - no case found.`;
+ return `${emojis.success} ${id} - ${case_.id}`;
});
client.emit('massEvidence', message.member!, message.guild, evidence, lines);
- const embeds = util.overflowEmbed(
+ const embeds = overflowEmbed(
{
- color: util.colors.DarkRed,
+ color: colors.DarkRed,
title: 'Mass Evidence'
},
lines