diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-28 09:27:41 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-28 09:27:41 -0500 |
commit | 453683b57b8ff013ff25e2aaa4aa1d2e047edcb7 (patch) | |
tree | 8b98d2f30dbb6a8448602446cfacf9091667cc33 /src/commands/utilities/uuid.ts | |
parent | de4c3dcaf172804d34ae708be1ed3e75af42f4d5 (diff) | |
download | tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.tar.gz tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.tar.bz2 tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.zip |
a few small changes
Diffstat (limited to 'src/commands/utilities/uuid.ts')
-rw-r--r-- | src/commands/utilities/uuid.ts | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/commands/utilities/uuid.ts b/src/commands/utilities/uuid.ts index 556a4de..e0f6b1c 100644 --- a/src/commands/utilities/uuid.ts +++ b/src/commands/utilities/uuid.ts @@ -5,41 +5,40 @@ export default class UuidCommand extends BushCommand { super('uuid', { aliases: ['uuid'], category: 'utilities', - description: { - content: "Find someone's minecraft uuid", - usage: ['uuid <ign>'], - examples: ['uuid ironm00n'] - }, + description: "Find someone's minecraft uuid", + usage: ['uuid <ign>'], + examples: ['uuid ironm00n'], args: [ { id: 'ign', + description: 'The ign to find the ign of.', customType: /\w{1,16}/im, - prompt: { - start: 'What ign would you like to find the uuid of?', - retry: '{error} Choose a valid ign.', - optional: false - } - } - ], - slash: true, - slashOptions: [ + readableType: 'ign', + prompt: 'What ign would you like to find the uuid of?', + retry: '{error} Choose a valid ign.', + slashType: 'STRING' + }, { - name: 'ign', - description: 'What ign would you like to find the uuid of?', - type: 'STRING', - required: false + id: 'dashed', + description: 'Include dashes in the uuid.', + match: 'flag', + flag: '--dashed', + prompt: 'Would you like to include dashes in the uuid?', + slashType: 'BOOLEAN', + optional: true } ], + slash: true, clientPermissions: (m) => util.clientSendAndPermCheck(m), userPermissions: [] }); } - public override async exec(message: BushMessage, { ign }: { ign: { match: any[]; matches: any[] } }) { + public override async exec(message: BushMessage, { ign, dashed }: { ign: { match: any[]; matches: any[] }; dashed: boolean }) { if (!ign) return await message.util.reply(`${util.emojis.error} Please enter a valid ign.`); const readableIGN = ign.match[0]; try { - const uuid = await util.findUUID(readableIGN); + const uuid = await util.mcUUID(readableIGN, dashed); return await message.util.reply(`The uuid for \`${readableIGN}\` is \`${uuid}\``); } catch (e) { return await message.util.reply(`${util.emojis.error} Could not find an uuid for \`${readableIGN}\`.`); |