diff options
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/config/config.ts | 1 | ||||
-rw-r--r-- | src/commands/config/features.ts | 27 | ||||
-rw-r--r-- | src/commands/utilities/uuid.ts | 2 | ||||
-rw-r--r-- | src/commands/utilities/wolframAlpha.ts | 2 |
4 files changed, 15 insertions, 17 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index 7811663..00c6a69 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -101,7 +101,6 @@ export default class SettingsCommand extends BushCommand { }); } - // I make very readable code :) override *args(message: BushMessage): Generator<ArgumentOptions | Flag> { const optional = message.util.parsed!.alias === 'settings'; const setting = yield { diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts index 7f9ffc9..8c9351d 100644 --- a/src/commands/config/features.ts +++ b/src/commands/config/features.ts @@ -74,21 +74,20 @@ export default class FeaturesCommand extends BushCommand { ); } - public generateComponents(guildFeatures: GuildFeatures[], disable: boolean): MessageActionRow { + public generateComponents(guildFeatures: GuildFeatures[], disable: boolean) { return new MessageActionRow().addComponents( - new MessageSelectMenu() - .addOptions( - ...guildFeatures.map((f) => ({ - label: guildFeaturesObj[f].name, - value: f, - description: guildFeaturesObj[f].description - })) - ) - .setPlaceholder('Select A Feature to Toggle') - .setMaxValues(1) - .setMinValues(1) - .setCustomId('command_selectFeature') - .setDisabled(disable) + new MessageSelectMenu({ + customId: 'command_selectFeature', + disabled: disable, + maxValues: 1, + minValues: 2, + options: guildFeatures.map((f) => ({ + label: guildFeaturesObj[f].name, + value: f, + description: guildFeaturesObj[f].description + })), + placeholder: 'Select A Feature to Toggle' + }) ); } } diff --git a/src/commands/utilities/uuid.ts b/src/commands/utilities/uuid.ts index 556a4de..1be6079 100644 --- a/src/commands/utilities/uuid.ts +++ b/src/commands/utilities/uuid.ts @@ -2,7 +2,7 @@ import { BushCommand, type BushMessage } from '#lib'; export default class UuidCommand extends BushCommand { public constructor() { - super('uuid', { + super('uuid', { aliases: ['uuid'], category: 'utilities', description: { diff --git a/src/commands/utilities/wolframAlpha.ts b/src/commands/utilities/wolframAlpha.ts index aba0f57..13512bb 100644 --- a/src/commands/utilities/wolframAlpha.ts +++ b/src/commands/utilities/wolframAlpha.ts @@ -1,6 +1,6 @@ import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed, type MessageOptions } from 'discord.js'; -const {default: WolframAlphaAPI} = (await import("wolfram-alpha-api")).default as unknown as typeof import( "wolfram-alpha-api") +const { default: WolframAlphaAPI } = (await import("@notenoughupdates/wolfram-alpha-api")).default as unknown as typeof import("@notenoughupdates/wolfram-alpha-api") export default class WolframAlphaCommand extends BushCommand { public constructor() { |