diff options
Diffstat (limited to 'src/commands/utilities')
-rw-r--r-- | src/commands/utilities/highlight-!.ts | 7 | ||||
-rw-r--r-- | src/commands/utilities/uuid.ts | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/commands/utilities/highlight-!.ts b/src/commands/utilities/highlight-!.ts index a4b8f42..b93f59a 100644 --- a/src/commands/utilities/highlight-!.ts +++ b/src/commands/utilities/highlight-!.ts @@ -1,11 +1,6 @@ -import { BushCommand, clientSendAndPermCheck, Highlight, HighlightWord, type SlashMessage } from '#lib'; +import { BushCommand, clientSendAndPermCheck, deepWriteable, Highlight, HighlightWord, type SlashMessage } from '#lib'; import { Flag, type ArgumentGeneratorReturn, type SlashOption } from 'discord-akairo'; import { ApplicationCommandOptionType, Constants, type AutocompleteInteraction, type CacheType } from 'discord.js'; -import { DeepWritable } from 'ts-essentials'; - -function deepWriteable<T>(obj: T): DeepWritable<T> { - return obj as DeepWritable<T>; -} export const highlightSubcommands = deepWriteable({ add: { diff --git a/src/commands/utilities/uuid.ts b/src/commands/utilities/uuid.ts index 44cfeda..3f99e66 100644 --- a/src/commands/utilities/uuid.ts +++ b/src/commands/utilities/uuid.ts @@ -49,7 +49,7 @@ export default class UuidCommand extends BushCommand { message: CommandMessage | SlashMessage, args: { ign: ArgType<'regex'> | string; dashed: ArgType<'flag'> } ) { - if (typeof args.ign === 'string') args.ign = { match: /\w{1,16}/im.exec(args.ign)!, matches: [] }; + if (typeof args.ign === 'string') args.ign = { match: args.ign.match(/\w{1,16}/im)!, matches: [] }; if (!args.ign.match) return await message.util.reply(`${emojis.error} Please enter a valid ign.`); const readableIGN = args.ign.match[0]; |