diff options
Diffstat (limited to 'src/commands/utilities/highlight-matches.ts')
-rw-r--r-- | src/commands/utilities/highlight-matches.ts | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/commands/utilities/highlight-matches.ts b/src/commands/utilities/highlight-matches.ts index 40020cd..b458550 100644 --- a/src/commands/utilities/highlight-matches.ts +++ b/src/commands/utilities/highlight-matches.ts @@ -1,4 +1,4 @@ -import { BushCommand, ButtonPaginator, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; +import { BushCommand, ButtonPaginator, chunk, colors, emojis, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; import assert from 'assert'; import { type ArgumentGeneratorReturn } from 'discord-akairo'; import { type APIEmbed } from 'discord.js'; @@ -36,18 +36,16 @@ export default class HighlightMatchesCommand extends BushCommand { const res = await client.highlightManager.checkPhrase(message.guild.id, message.author.id, args.phrase); - if (!res.size) return await message.util.reply(`${util.emojis.error} You are not highlighting any words`); + if (!res.size) return await message.util.reply(`${emojis.error} You are not highlighting any words`); - const lines = res.map( - (passed, hl) => `${passed ? util.emojis.check : util.emojis.cross} ${hl.regex ? `/${hl.word}/gi` : hl.word}` - ); - const chunked = util.chunk(lines, 10); + const lines = res.map((passed, hl) => `${passed ? emojis.check : emojis.cross} ${hl.regex ? `/${hl.word}/gi` : hl.word}`); + const chunked = chunk(lines, 10); const pages = chunked.map( (chunk): APIEmbed => ({ title: `Matches`, description: chunk.join('\n'), - color: util.colors.default + color: colors.default }) ); |