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 | |
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')
-rw-r--r-- | src/commands/config/config.ts | 4 | ||||
-rw-r--r-- | src/commands/dev/superUser.ts | 2 | ||||
-rw-r--r-- | src/commands/info/avatar.ts | 4 | ||||
-rw-r--r-- | src/commands/info/icon.ts | 4 | ||||
-rw-r--r-- | src/commands/info/pronouns.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/evidence.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/role.ts | 6 | ||||
-rw-r--r-- | src/commands/utilities/activity.ts | 6 | ||||
-rw-r--r-- | src/commands/utilities/steal.ts | 4 |
9 files changed, 17 insertions, 17 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index 580f8d2..2fae2fd 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -9,7 +9,7 @@ import { type GuildSettingType } from '#lib'; import assert from 'assert'; -import { SlashOption, type ArgumentOptions, type Flag } from 'discord-akairo'; +import { type ArgumentGeneratorReturn, type SlashOption } from 'discord-akairo'; import { ActionRow, ApplicationCommandOptionType, @@ -130,7 +130,7 @@ export default class ConfigCommand extends BushCommand { }); } - public override *args(message: BushMessage): Generator<ArgumentOptions | Flag, any, any> { + public override *args(message: BushMessage): ArgumentGeneratorReturn { const optional = message.util.parsed!.alias === 'settings'; const setting: GuildSettings = yield { id: 'setting', diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts index 7b75672..b184f6f 100644 --- a/src/commands/dev/superUser.ts +++ b/src/commands/dev/superUser.ts @@ -31,7 +31,7 @@ export default class SuperUserCommand extends BushCommand { }); } - override *args(): ArgumentGeneratorReturn { + public override *args(): ArgumentGeneratorReturn { const action: 'add' | 'remove' = yield { id: 'action', type: ['add', 'remove'], diff --git a/src/commands/info/avatar.ts b/src/commands/info/avatar.ts index 0ea9179..6b4afa1 100644 --- a/src/commands/info/avatar.ts +++ b/src/commands/info/avatar.ts @@ -2,7 +2,7 @@ import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } fr import { ApplicationCommandOptionType, Embed, GuildMember, PermissionFlagsBits } from 'discord.js'; export default class AvatarCommand extends BushCommand { - constructor() { + public constructor() { super('avatar', { aliases: ['avatar', 'av'], category: 'info', @@ -27,7 +27,7 @@ export default class AvatarCommand extends BushCommand { }); } - override async exec(message: BushMessage | BushSlashMessage, args: { user: ArgType<'member'> | ArgType<'globalUser'> }) { + public override async exec(message: BushMessage | BushSlashMessage, args: { user: ArgType<'member'> | ArgType<'globalUser'> }) { const params: { size: 2048; extension: 'png'; dynamic: true } = { size: 2048, extension: 'png', dynamic: true }; const defaultAvatar = `https://cdn.discordapp.com/embed/avatars/${Math.ceil(Math.random() * 6) - 1}.png`; diff --git a/src/commands/info/icon.ts b/src/commands/info/icon.ts index b40b814..2b5b8fb 100644 --- a/src/commands/info/icon.ts +++ b/src/commands/info/icon.ts @@ -2,7 +2,7 @@ import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { Embed, PermissionFlagsBits } from 'discord.js'; export default class IconCommand extends BushCommand { - constructor() { + public constructor() { super('icon', { aliases: ['icon', 'guildavatar', 'severicon', 'guildicon'], category: 'info', @@ -16,7 +16,7 @@ export default class IconCommand extends BushCommand { }); } - override async exec(message: BushMessage | BushSlashMessage) { + public override async exec(message: BushMessage | BushSlashMessage) { const embed = new Embed() .setTimestamp() .setColor(util.colors.default) diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts index 652881b..3eccd85 100644 --- a/src/commands/info/pronouns.ts +++ b/src/commands/info/pronouns.ts @@ -26,7 +26,7 @@ export default class PronounsCommand extends BushCommand { }); } - override async exec(message: BushMessage | BushSlashMessage, args: { user?: ArgType<'globalUser'> }) { + public override async exec(message: BushMessage | BushSlashMessage, args: { user?: ArgType<'globalUser'> }) { const user = args.user ?? message.author; const author = user.id === message.author.id; diff --git a/src/commands/moderation/evidence.ts b/src/commands/moderation/evidence.ts index d951f3d..444a173 100644 --- a/src/commands/moderation/evidence.ts +++ b/src/commands/moderation/evidence.ts @@ -36,7 +36,7 @@ export default class EvidenceCommand extends BushCommand { }); } - override *args(message: BushMessage): ArgumentGeneratorReturn { + public override *args(message: BushMessage): ArgumentGeneratorReturn { const case_id: ArgumentTypeCasterReturn<'string'> = yield { id: 'case_id', type: 'string', diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts index b76795b..920ef81 100644 --- a/src/commands/moderation/role.ts +++ b/src/commands/moderation/role.ts @@ -8,7 +8,7 @@ import { type BushSlashMessage, type OptionalArgType } from '#lib'; -import { type ArgumentOptions, type Flag } from 'discord-akairo'; +import { type ArgumentGeneratorReturn } from 'discord-akairo'; import { ApplicationCommandOptionType, PermissionFlagsBits, type Snowflake } from 'discord.js'; export default class RoleCommand extends BushCommand { @@ -66,7 +66,7 @@ export default class RoleCommand extends BushCommand { }); } - public override *args(message: BushMessage): Generator<ArgumentOptions | Flag> { + public override *args(message: BushMessage): ArgumentGeneratorReturn { const action = (['rr'] as const).includes(message.util.parsed?.alias ?? '') ? 'remove' : (['ar', 'ra'] as const).includes(message.util.parsed?.alias ?? '') @@ -211,7 +211,7 @@ export default class RoleCommand extends BushCommand { await message.util.reply({ content: responseMessage(), allowedMentions: AllowedMentions.none() }); } - punishmentRoleNames = [ + private punishmentRoleNames = [ 'No Files', 'No Links', 'No Threads', 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 |