aboutsummaryrefslogtreecommitdiff
path: root/src/commands/utilities/highlight-add.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/utilities/highlight-add.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/utilities/highlight-add.ts')
-rw-r--r--src/commands/utilities/highlight-add.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/commands/utilities/highlight-add.ts b/src/commands/utilities/highlight-add.ts
index 726b887..9624a7e 100644
--- a/src/commands/utilities/highlight-add.ts
+++ b/src/commands/utilities/highlight-add.ts
@@ -1,4 +1,4 @@
-import { AllowedMentions, BushCommand, type ArgType, type CommandMessage, type SlashMessage } from '#lib';
+import { AllowedMentions, BushCommand, emojis, format, type ArgType, type CommandMessage, type SlashMessage } from '#lib';
import assert from 'assert';
import { highlightCommandArgs, highlightSubcommands } from './highlight-!.js';
@@ -44,16 +44,16 @@ export default class HighlightAddCommand extends BushCommand {
if (!args.regex) {
if (args.word.length < 2)
- return message.util.send(`${util.emojis.error} You can only highlight words that are longer than 2 characters.`);
+ return message.util.send(`${emojis.error} You can only highlight words that are longer than 2 characters.`);
if (args.word.length > 50)
- return await message.util.reply(`${util.emojis.error} You can only highlight words that are shorter than 50 characters.`);
+ return await message.util.reply(`${emojis.error} You can only highlight words that are shorter than 50 characters.`);
} else {
try {
new RegExp(args.word);
} catch (e) {
assert(e instanceof SyntaxError);
return message.util.send({
- content: `${util.emojis.error} Invalid regex ${util.format.inlineCode(e.message)}.`,
+ content: `${emojis.error} Invalid regex ${format.inlineCode(e.message)}.`,
allowedMentions: AllowedMentions.none()
});
}
@@ -65,15 +65,15 @@ export default class HighlightAddCommand extends BushCommand {
});
if (typeof res === 'string')
- return await message.util.reply({ content: `${util.emojis.error} ${res}`, allowedMentions: AllowedMentions.none() });
+ return await message.util.reply({ content: `${emojis.error} ${res}`, allowedMentions: AllowedMentions.none() });
else if (!res)
return await message.util.reply({
- content: `${util.emojis.error} There was an error highlighting "${args.word}".`,
+ content: `${emojis.error} There was an error highlighting "${args.word}".`,
allowedMentions: AllowedMentions.none()
});
return await message.util.reply({
- content: `${util.emojis.success} Successfully added "${args.word}" to your highlight list.`,
+ content: `${emojis.success} Successfully added "${args.word}" to your highlight list.`,
allowedMentions: AllowedMentions.none()
});
}