diff options
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/config/config.ts | 6 | ||||
-rw-r--r-- | src/commands/config/log.ts | 4 | ||||
-rw-r--r-- | src/commands/info/userInfo.ts | 8 | ||||
-rw-r--r-- | src/commands/utilities/price.ts | 4 | ||||
-rw-r--r-- | src/commands/utilities/whoHasRole.ts | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index b923d56..adc41d8 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -3,9 +3,9 @@ import { BotCommand, colors, emojis, + formatList, GuildNoArraySetting, guildSettingsObj, - oxford, settingsArr, type ArgType, type CommandMessage, @@ -174,11 +174,11 @@ export default class ConfigCommand extends BotCommand { id: 'action', type: actionType, prompt: { - start: `Would you like to ${oxford( + start: `Would you like to ${formatList( actionType!.map((a) => `\`${a}\``), 'or' )} the \`${setting}\` setting?`, - retry: `{error} Choose one of the following actions to perform on the ${setting} setting: ${oxford( + retry: `{error} Choose one of the following actions to perform on the ${setting} setting: ${formatList( actionType!.map((a) => `\`${a}\``), 'or' )}`, diff --git a/src/commands/config/log.ts b/src/commands/config/log.ts index 493d486..0c74ce7 100644 --- a/src/commands/config/log.ts +++ b/src/commands/config/log.ts @@ -1,8 +1,8 @@ import { BotCommand, emojis, + formatList, guildLogsArr, - oxford, type ArgType, type CommandMessage, type GuildLogType, @@ -58,7 +58,7 @@ export default class LogCommand extends BotCommand { type: guildLogsArr, prompt: { start: 'What log type would you like to change?', - retry: `{error} Choose either ${oxford( + retry: `{error} Choose either ${formatList( guildLogsArr.map((l) => `\`${l}\``), 'or' )}`, diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index 86132c7..25621fa 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -4,8 +4,8 @@ import { bots, colors, emojis, + formatList, mappings, - oxford, sleep, Time, timestampAndDelta, @@ -200,9 +200,9 @@ export default class UserInfoCommand extends BotCommand { const presenceInfo = []; if (member?.presence.status) presenceInfo.push(`**Status:** ${member.presence.status}`); if (devices && devices.length) - presenceInfo.push(`**${devices.length - 1 ? 'Devices' : 'Device'}:** ${oxford(devices, 'and', '')}`); + presenceInfo.push(`**${devices.length - 1 ? 'Devices' : 'Device'}:** ${formatList(devices, 'and')}`); if (activitiesNames.length) - presenceInfo.push(`**Activit${activitiesNames.length - 1 ? 'ies' : 'y'}:** ${oxford(activitiesNames, 'and', '')}`); + presenceInfo.push(`**Activit${activitiesNames.length - 1 ? 'ies' : 'y'}:** ${formatList(activitiesNames, 'and')}`); if (customStatus && customStatus.length) presenceInfo.push(`**Custom Status:** ${escapeMarkdown(customStatus)}`); embed.addFields({ name: title, value: presenceInfo.join('\n') }); @@ -245,7 +245,7 @@ export default class UserInfoCommand extends BotCommand { // Important Perms const perms = this.getImportantPermissions(member); - if (perms.length) embed.addFields({ name: title, value: this.getImportantPermissions(member).join(' ') }); + if (perms.length) embed.addFields({ name: title, value: perms.join(' ') }); } private static getImportantPermissions(member: GuildMember | undefined) { diff --git a/src/commands/utilities/price.ts b/src/commands/utilities/price.ts index 06afe3b..6f08aaa 100644 --- a/src/commands/utilities/price.ts +++ b/src/commands/utilities/price.ts @@ -1,4 +1,4 @@ -import { ArgType, BotCommand, colors, emojis, format, oxford, type CommandMessage } from '#lib'; +import { ArgType, BotCommand, colors, emojis, format, formatList, type CommandMessage } from '#lib'; import assert from 'assert/strict'; import { ApplicationCommandOptionType, AutocompleteInteraction, EmbedBuilder } from 'discord.js'; import { default as Fuse } from 'fuse.js'; @@ -68,7 +68,7 @@ export default class PriceCommand extends BotCommand { if (bazaar?.success === false) errors.push('bazaar'); if (errors.length) { - priceEmbed.setFooter({ text: `Could not fetch data for ${oxford(errors, 'and')}` }); + priceEmbed.setFooter({ text: `Could not fetch data for ${formatList(errors, 'and')}` }); } // create a set from all the item names so that there are no duplicates for the fuzzy search diff --git a/src/commands/utilities/whoHasRole.ts b/src/commands/utilities/whoHasRole.ts index 9b12a1c..c01a0c3 100644 --- a/src/commands/utilities/whoHasRole.ts +++ b/src/commands/utilities/whoHasRole.ts @@ -4,8 +4,8 @@ import { chunk, colors, emojis, + formatList, OptArgType, - oxford, type CommandMessage, type SlashMessage } from '#lib'; @@ -60,7 +60,7 @@ export default class WhoHasRoleCommand extends BotCommand { const title = `Members with ${ roles.length < 4 - ? oxford( + ? formatList( rawRoles.map((r) => r.name), 'and' ) |