diff options
Diffstat (limited to 'src/commands/utilities/highlight-add.ts')
-rw-r--r-- | src/commands/utilities/highlight-add.ts | 14 |
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() }); } |