diff options
Diffstat (limited to 'src/listeners/commands')
-rw-r--r-- | src/listeners/commands/commandBlocked.ts | 6 | ||||
-rw-r--r-- | src/listeners/commands/commandMissingPermissions.ts | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/listeners/commands/commandBlocked.ts b/src/listeners/commands/commandBlocked.ts index 534e744..c81857c 100644 --- a/src/listeners/commands/commandBlocked.ts +++ b/src/listeners/commands/commandBlocked.ts @@ -4,8 +4,8 @@ import { Emitter, emojis, format, + formatList, InhibitorReason, - oxford, type BotCommandHandlerEvents, type CommandMessage } from '#lib'; @@ -95,7 +95,7 @@ export default class CommandBlockedListener extends BotListener { channels!.forEach((c) => { names.push(`<#${c}>`); }); - const pretty = oxford(names, 'and'); + const pretty = formatList(names, 'and'); return await respond({ content: `${emojis.error} ${format.input(command!.id)} can only be run in ${pretty}.`, ephemeral: true @@ -105,7 +105,7 @@ export default class CommandBlockedListener extends BotListener { if (!command) break; const guilds = command.restrictedGuilds; const names = guilds!.map((g) => format.input(client.guilds.cache.get(g)?.name ?? g)); - const pretty = oxford(names, 'and'); + const pretty = formatList(names, 'and'); return await respond({ content: `${emojis.error} ${format.input(command!.id)} can only be run in ${pretty}.`, ephemeral: true diff --git a/src/listeners/commands/commandMissingPermissions.ts b/src/listeners/commands/commandMissingPermissions.ts index 9a59077..598b7d9 100644 --- a/src/listeners/commands/commandMissingPermissions.ts +++ b/src/listeners/commands/commandMissingPermissions.ts @@ -4,9 +4,9 @@ import { Emitter, emojis, format, + formatList, mappings, - oxford, - surroundArray, + surroundEach, type BotCommandHandlerEvents } from '#lib'; import { Client, type PermissionsString } from 'discord.js'; @@ -32,8 +32,8 @@ export default class CommandMissingPermissionsListener extends BotListener { (perm) => mappings.permissions[perm as PermissionsString]?.name ?? missing ); - const discordFormat = oxford(surroundArray(niceMissing, '**'), 'and', ''); - const consoleFormat = oxford(surroundArray(niceMissing, '<<', '>>'), 'and', ''); + const discordFormat = formatList(surroundEach(niceMissing, '**'), 'and'); + const consoleFormat = formatList(surroundEach(niceMissing, '<<', '>>'), 'and'); void client.console.info( 'commandMissingPermissions', `<<${message.author.tag}>> tried to run <<${ |