diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-04 14:08:09 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-04 14:08:09 -0500 |
commit | d5d5fd6f77f2d778ab099d52f1acaad762712822 (patch) | |
tree | ababfba81c28c102b932e2713c1614260a424285 /src/commands/utilities | |
parent | e5bc336f9586b1f5515be3f1d239d2194489e9c5 (diff) | |
download | tanzanite-d5d5fd6f77f2d778ab099d52f1acaad762712822.tar.gz tanzanite-d5d5fd6f77f2d778ab099d52f1acaad762712822.tar.bz2 tanzanite-d5d5fd6f77f2d778ab099d52f1acaad762712822.zip |
explicit member accessibility & jsdocs & typings
Diffstat (limited to 'src/commands/utilities')
-rw-r--r-- | src/commands/utilities/activity.ts | 6 | ||||
-rw-r--r-- | src/commands/utilities/steal.ts | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/commands/utilities/activity.ts b/src/commands/utilities/activity.ts index 52cad26..882c15d 100644 --- a/src/commands/utilities/activity.ts +++ b/src/commands/utilities/activity.ts @@ -1,5 +1,5 @@ import { BushCommand, type ArgType, type BushArgumentTypeCaster, type BushMessage, type BushSlashMessage } from '#lib'; -import { type ArgumentOptions, type ArgumentTypeCaster, type Flag } from 'discord-akairo'; +import { type ArgumentGeneratorReturn, type ArgumentTypeCaster } from 'discord-akairo'; import { ApplicationCommandOptionType, ChannelType, type DiscordAPIError, type Snowflake } from 'discord.js'; const activityMap = { @@ -74,7 +74,7 @@ const activityTypeCaster: BushArgumentTypeCaster<Snowflake | null> = (message: B }; export default class ActivityCommand extends BushCommand { - constructor() { + public constructor() { super('activity', { aliases: ['activity', ...Object.values(activityMap).flatMap((a) => a.aliases)], category: 'utilities', @@ -120,7 +120,7 @@ export default class ActivityCommand extends BushCommand { }); } - public override *args(message: BushMessage): Generator<ArgumentOptions | Flag, any, any> { + public override *args(message: BushMessage): ArgumentGeneratorReturn { const channel: ArgType<'voiceChannel'> = yield { id: 'channel', description: 'The channel to create the activity in.', diff --git a/src/commands/utilities/steal.ts b/src/commands/utilities/steal.ts index 820fa89..d603222 100644 --- a/src/commands/utilities/steal.ts +++ b/src/commands/utilities/steal.ts @@ -1,6 +1,6 @@ import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import assert from 'assert'; -import { type ArgumentOptions, type ArgumentType, type ArgumentTypeCaster, type Flag } from 'discord-akairo'; +import { type ArgumentGeneratorReturn, type ArgumentType, type ArgumentTypeCaster } from 'discord-akairo'; import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js'; import _ from 'lodash'; import { URL } from 'url'; @@ -44,7 +44,7 @@ export default class StealCommand extends BushCommand { }); } - public override *args(message: BushMessage): Generator<ArgumentOptions | Flag> { + public override *args(message: BushMessage): ArgumentGeneratorReturn { const hasImage = message.attachments.size && message.attachments.first()?.contentType?.includes('image/'); const emoji = hasImage |