diff options
Diffstat (limited to 'src/commands/utilities')
-rw-r--r-- | src/commands/utilities/activity.ts | 2 | ||||
-rw-r--r-- | src/commands/utilities/highlight-!.ts | 2 | ||||
-rw-r--r-- | src/commands/utilities/highlight-block.ts | 2 | ||||
-rw-r--r-- | src/commands/utilities/highlight-matches.ts | 2 | ||||
-rw-r--r-- | src/commands/utilities/highlight-unblock.ts | 2 | ||||
-rw-r--r-- | src/commands/utilities/price.ts | 4 | ||||
-rw-r--r-- | src/commands/utilities/steal.ts | 8 | ||||
-rw-r--r-- | src/commands/utilities/whoHasRole.ts | 2 | ||||
-rw-r--r-- | src/commands/utilities/wolframAlpha.ts | 6 |
9 files changed, 15 insertions, 15 deletions
diff --git a/src/commands/utilities/activity.ts b/src/commands/utilities/activity.ts index 89ca53e..3f17d0a 100644 --- a/src/commands/utilities/activity.ts +++ b/src/commands/utilities/activity.ts @@ -7,7 +7,7 @@ import { type CommandMessage, type SlashMessage } from '#lib'; -import { type ArgumentGeneratorReturn, type ArgumentTypeCaster } from 'discord-akairo'; +import { type ArgumentGeneratorReturn, type ArgumentTypeCaster } from '@notenoughupdates/discord-akairo'; import { ApplicationCommandOptionType, ChannelType, type DiscordAPIError, type Snowflake } from 'discord.js'; const activityMap = { diff --git a/src/commands/utilities/highlight-!.ts b/src/commands/utilities/highlight-!.ts index 7716887..0e2db33 100644 --- a/src/commands/utilities/highlight-!.ts +++ b/src/commands/utilities/highlight-!.ts @@ -1,5 +1,5 @@ import { BotCommand, deepWriteable, Highlight, HighlightWord, type SlashMessage } from '#lib'; -import { Flag, type ArgumentGeneratorReturn, type SlashOption } from 'discord-akairo'; +import { Flag, type ArgumentGeneratorReturn, type SlashOption } from '@notenoughupdates/discord-akairo'; import { ApplicationCommandOptionType, Constants, type AutocompleteInteraction, type CacheType } from 'discord.js'; export const highlightSubcommands = deepWriteable({ diff --git a/src/commands/utilities/highlight-block.ts b/src/commands/utilities/highlight-block.ts index b16852e..d1dec1e 100644 --- a/src/commands/utilities/highlight-block.ts +++ b/src/commands/utilities/highlight-block.ts @@ -1,6 +1,6 @@ import { AllowedMentions, BotCommand, emojis, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; +import { Argument, ArgumentGeneratorReturn } from '@notenoughupdates/discord-akairo'; import assert from 'assert/strict'; -import { Argument, ArgumentGeneratorReturn } from 'discord-akairo'; import { BaseChannel, GuildMember, User } from 'discord.js'; import { HighlightBlockResult } from '../../../lib/common/HighlightManager.js'; import { highlightSubcommands } from './highlight-!.js'; diff --git a/src/commands/utilities/highlight-matches.ts b/src/commands/utilities/highlight-matches.ts index d54fd4a..0665b37 100644 --- a/src/commands/utilities/highlight-matches.ts +++ b/src/commands/utilities/highlight-matches.ts @@ -1,6 +1,6 @@ import { BotCommand, ButtonPaginator, chunk, colors, emojis, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; +import { type ArgumentGeneratorReturn } from '@notenoughupdates/discord-akairo'; import assert from 'assert/strict'; -import { type ArgumentGeneratorReturn } from 'discord-akairo'; import { type APIEmbed } from 'discord.js'; import { highlightSubcommands } from './highlight-!.js'; diff --git a/src/commands/utilities/highlight-unblock.ts b/src/commands/utilities/highlight-unblock.ts index 0f2dd78..f9cc806 100644 --- a/src/commands/utilities/highlight-unblock.ts +++ b/src/commands/utilities/highlight-unblock.ts @@ -1,6 +1,6 @@ import { AllowedMentions, BotCommand, emojis, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; +import { Argument, ArgumentGeneratorReturn } from '@notenoughupdates/discord-akairo'; import assert from 'assert'; -import { Argument, ArgumentGeneratorReturn } from 'discord-akairo'; import { BaseChannel, GuildMember, User } from 'discord.js'; import { HighlightUnblockResult } from '../../../lib/common/HighlightManager.js'; import { highlightSubcommands } from './highlight-!.js'; diff --git a/src/commands/utilities/price.ts b/src/commands/utilities/price.ts index 6f08aaa..0d5d4b3 100644 --- a/src/commands/utilities/price.ts +++ b/src/commands/utilities/price.ts @@ -1,7 +1,9 @@ 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'; + +// todo: remove this bullshit once typescript gets its shit together +const Fuse = (await import('fuse.js')).default as unknown as typeof import('fuse.js').default; assert(Fuse); diff --git a/src/commands/utilities/steal.ts b/src/commands/utilities/steal.ts index a208920..bd2976a 100644 --- a/src/commands/utilities/steal.ts +++ b/src/commands/utilities/steal.ts @@ -1,13 +1,11 @@ import { Arg, BotCommand, emojis, format, OptArgType, regex, type CommandMessage, type SlashMessage } from '#lib'; +import { type ArgumentGeneratorReturn, type ArgumentType, type ArgumentTypeCaster } from '@notenoughupdates/discord-akairo'; import assert from 'assert/strict'; -import { type ArgumentGeneratorReturn, type ArgumentType, type ArgumentTypeCaster } from 'discord-akairo'; import { ApplicationCommandOptionType, Attachment } from 'discord.js'; -import _ from 'lodash'; +import { snakeCase } from 'lodash-es'; import { Stream } from 'stream'; import { URL } from 'url'; -assert(_); - // so I don't have to retype things const enum lang { emojiStart = 'What emoji would you like to steal?', @@ -53,7 +51,7 @@ export default class StealCommand extends BotCommand { const name = yield { prompt: { start: lang.nameStart, retry: lang.nameRetry, optional: true }, - default: hasImage && message.attachments.first()!.name ? _.snakeCase(message.attachments.first()!.name!) : 'unnamed_emoji' + default: hasImage && message.attachments.first()!.name ? snakeCase(message.attachments.first()!.name!) : 'unnamed_emoji' }; return { emoji, name }; diff --git a/src/commands/utilities/whoHasRole.ts b/src/commands/utilities/whoHasRole.ts index c01a0c3..31e413d 100644 --- a/src/commands/utilities/whoHasRole.ts +++ b/src/commands/utilities/whoHasRole.ts @@ -77,7 +77,7 @@ export default class WhoHasRoleCommand extends BotCommand { return await message.util.reply(`${emojis.error} No members found matching the given roles.`); } - return await ButtonPaginator.send(message, embedPages, null, true); + return await ButtonPaginator.send(message, embedPages, '', true); } } diff --git a/src/commands/utilities/wolframAlpha.ts b/src/commands/utilities/wolframAlpha.ts index 503af87..48739cf 100644 --- a/src/commands/utilities/wolframAlpha.ts +++ b/src/commands/utilities/wolframAlpha.ts @@ -1,7 +1,7 @@ import { AllowedMentions, BotCommand, colors, emojis, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; -import { initializeClass as WolframAlphaAPI } from '@notenoughupdates/wolfram-alpha-api'; +import { initializeClass as WolframAlphaAPI } from '@tanzanite/wolfram-alpha'; import assert from 'assert/strict'; -import { ApplicationCommandOptionType, EmbedBuilder, type MessageOptions } from 'discord.js'; +import { ApplicationCommandOptionType, EmbedBuilder, type MessageCreateOptions } from 'discord.js'; assert(WolframAlphaAPI); @@ -62,7 +62,7 @@ export default class WolframAlphaCommand extends BotCommand { name: '📥 Input', value: await this.client.utils.inspectCleanRedactCodeblock(args.expression) }); - const sendOptions: MessageOptions = { content: null, allowedMentions: AllowedMentions.none() }; + const sendOptions: MessageCreateOptions = { content: '', allowedMentions: AllowedMentions.none() }; try { const calculated = await (args.image ? waApi.getSimple({ i: args.expression, timeout: 1, background: '2C2F33', foreground: 'white' }) |