diff options
Diffstat (limited to 'src')
4 files changed, 16 insertions, 12 deletions
diff --git a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts index 8eec9a7..fb4f84c 100644 --- a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts +++ b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts @@ -1,17 +1,16 @@ import { APIApplicationCommand } from 'discord-api-types'; import { ApplicationCommandData, CachedManager, Collection, FetchApplicationCommandOptions, Snowflake } from 'discord.js'; -import { RawApplicationCommandData } from 'discord.js/typings/rawDataTypes'; import { BushApplicationCommandResolvable, BushClient } from '../discord-akairo/BushClient'; import { BushApplicationCommand } from './BushApplicationCommand'; import { BushApplicationCommandPermissionsManager } from './BushApplicationCommandPermissionsManager'; import { BushGuildResolvable } from './BushCommandInteraction'; export class BushApplicationCommandManager< - ApplicationCommandType = BushApplicationCommand<{ guild: BushGuildResolvable }>, + ApplicationCommandScope = BushApplicationCommand<{ guild: BushGuildResolvable }>, PermissionsOptionsExtras = { guild: BushGuildResolvable }, PermissionsGuildType = null -> extends CachedManager<Snowflake, ApplicationCommandType, BushApplicationCommandResolvable> { - public constructor(client: BushClient, iterable?: Iterable<RawApplicationCommandData>); +> extends CachedManager<Snowflake, ApplicationCommandScope, BushApplicationCommandResolvable> { + public constructor(client: BushClient, iterable?: Iterable<unknown>); public permissions: BushApplicationCommandPermissionsManager< { command?: BushApplicationCommandResolvable } & PermissionsOptionsExtras, { command: BushApplicationCommandResolvable } & PermissionsOptionsExtras, @@ -20,10 +19,10 @@ export class BushApplicationCommandManager< null >; private commandPath({ id, guildId }: { id?: Snowflake; guildId?: Snowflake }): unknown; - public create(command: ApplicationCommandData): Promise<ApplicationCommandType>; + public create(command: ApplicationCommandData): Promise<ApplicationCommandScope>; public create(command: ApplicationCommandData, guildId: Snowflake): Promise<BushApplicationCommand>; - public delete(command: BushApplicationCommandResolvable, guildId?: Snowflake): Promise<ApplicationCommandType | null>; - public edit(command: BushApplicationCommandResolvable, data: ApplicationCommandData): Promise<ApplicationCommandType>; + public delete(command: BushApplicationCommandResolvable, guildId?: Snowflake): Promise<ApplicationCommandScope | null>; + public edit(command: BushApplicationCommandResolvable, data: ApplicationCommandData): Promise<ApplicationCommandScope>; public edit( command: BushApplicationCommandResolvable, data: ApplicationCommandData, @@ -33,12 +32,12 @@ export class BushApplicationCommandManager< id: Snowflake, options: FetchApplicationCommandOptions & { guildId: Snowflake } ): Promise<BushApplicationCommand>; - public fetch(id: Snowflake, options?: FetchApplicationCommandOptions): Promise<ApplicationCommandType>; + public fetch(id: Snowflake, options?: FetchApplicationCommandOptions): Promise<ApplicationCommandScope>; public fetch( id?: Snowflake, options?: FetchApplicationCommandOptions - ): Promise<Collection<Snowflake, ApplicationCommandType>>; - public set(commands: ApplicationCommandData[]): Promise<Collection<Snowflake, ApplicationCommandType>>; + ): Promise<Collection<Snowflake, ApplicationCommandScope>>; + public set(commands: ApplicationCommandData[]): Promise<Collection<Snowflake, ApplicationCommandScope>>; public set(commands: ApplicationCommandData[], guildId: Snowflake): Promise<Collection<Snowflake, BushApplicationCommand>>; private static transformCommand( command: ApplicationCommandData diff --git a/src/lib/extensions/discord.js/BushChannel.d.ts b/src/lib/extensions/discord.js/BushChannel.d.ts index 333ce06..2e465a5 100644 --- a/src/lib/extensions/discord.js/BushChannel.d.ts +++ b/src/lib/extensions/discord.js/BushChannel.d.ts @@ -3,7 +3,9 @@ import { Channel, ChannelMention } from 'discord.js'; import { ChannelTypes } from 'discord.js/typings/enums'; import { RawChannelData } from 'discord.js/typings/rawDataTypes'; import { BushClient, BushTextBasedChannels } from '../discord-akairo/BushClient'; +import { BushStageChannel } from './BushStageChannel'; import { BushThreadChannel } from './BushThreadChannel'; +import { BushVoiceChannel } from './BushVoiceChannel'; export class BushChannel extends Channel { public constructor(client: BushClient, data?: RawChannelData, immediatePatch?: boolean); @@ -16,6 +18,7 @@ export class BushChannel extends Channel { public delete(): Promise<BushChannel>; public fetch(force?: boolean): Promise<BushChannel>; public isText(): this is BushTextBasedChannels; + public isVoice(): this is BushVoiceChannel | BushStageChannel; public isThread(): this is BushThreadChannel; public toString(): ChannelMention; } diff --git a/src/lib/extensions/discord.js/BushCommandInteraction.ts b/src/lib/extensions/discord.js/BushCommandInteraction.ts index 9e30f79..56cdb75 100644 --- a/src/lib/extensions/discord.js/BushCommandInteraction.ts +++ b/src/lib/extensions/discord.js/BushCommandInteraction.ts @@ -1,5 +1,5 @@ import { APIInteractionGuildMember } from 'discord-api-types/v9'; -import { ApplicationCommand, CommandInteraction, Invite, Snowflake } from 'discord.js'; +import { CommandInteraction, Invite, Snowflake } from 'discord.js'; import { RawCommandInteractionData } from 'discord.js/typings/rawDataTypes'; import { BushClient, BushTextBasedChannels } from '../discord-akairo/BushClient'; import { BushApplicationCommand } from './BushApplicationCommand'; @@ -24,7 +24,7 @@ export class BushCommandInteraction extends CommandInteraction { super(client, data); } public declare readonly client: BushClient; - public declare readonly command: BushApplicationCommand | ApplicationCommand<{ guild: BushGuildResolvable }> | null; + public declare readonly command: BushApplicationCommand | BushApplicationCommand<{ guild: BushGuildResolvable }> | null; public declare readonly channel: BushTextBasedChannels | null; public declare readonly guild: BushGuild | null; public declare member: BushGuildMember | APIInteractionGuildMember | null; diff --git a/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts b/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts index cd74fff..e868b10 100644 --- a/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts +++ b/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts @@ -5,6 +5,7 @@ import { Collection, FetchMemberOptions, FetchMembersOptions, + GuildListMembersOptions, GuildMemberEditData, GuildPruneMembersOptions, GuildSearchMembersOptions, @@ -32,6 +33,7 @@ export class BushGuildMemberManager extends CachedManager<Snowflake, BushGuildMe ): Promise<BushGuildMember>; public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, BushGuildMember>>; public kick(user: BushUserResolvable, reason?: string): Promise<BushGuildMember | BushUser | Snowflake>; + public list(options?: GuildListMembersOptions): Promise<Collection<Snowflake, BushGuildMember>>; public prune(options: GuildPruneMembersOptions & { dry?: false; count: false }): Promise<null>; public prune(options?: GuildPruneMembersOptions): Promise<number>; public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, BushGuildMember>>; |