diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-29 21:16:30 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-29 21:16:30 -0400 |
commit | 1c6d451ffd63f9805b978e8565807e8a6b528681 (patch) | |
tree | 97ae6b3746b42ed21eb0fc3a3888bbfca36a1806 /src/lib/extensions/discord.js | |
parent | 7990abdb511eeec2a114b124a3628b10bfefc342 (diff) | |
download | tanzanite-1c6d451ffd63f9805b978e8565807e8a6b528681.tar.gz tanzanite-1c6d451ffd63f9805b978e8565807e8a6b528681.tar.bz2 tanzanite-1c6d451ffd63f9805b978e8565807e8a6b528681.zip |
added a rudimentary automod, fixed a bunch of stuff, added some more listeners
Diffstat (limited to 'src/lib/extensions/discord.js')
18 files changed, 252 insertions, 134 deletions
diff --git a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts new file mode 100644 index 0000000..0e071ff --- /dev/null +++ b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts @@ -0,0 +1,43 @@ +import { ApplicationCommandData, CachedManager, Collection, FetchApplicationCommandOptions, Snowflake } from 'discord.js'; +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 }>, + PermissionsOptionsExtras = { guild: BushGuildResolvable }, + PermissionsGuildType = null +> extends CachedManager<Snowflake, ApplicationCommandType, BushApplicationCommandResolvable> { + public constructor(client: BushClient, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public permissions: BushApplicationCommandPermissionsManager< + { command?: BushApplicationCommandResolvable } & PermissionsOptionsExtras, + { command: BushApplicationCommandResolvable } & PermissionsOptionsExtras, + PermissionsOptionsExtras, + PermissionsGuildType, + null + >; + private commandPath({ id, guildId }: { id?: Snowflake; guildId?: Snowflake }): unknown; + public create(command: ApplicationCommandData): Promise<ApplicationCommandType>; + 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 edit( + command: BushApplicationCommandResolvable, + data: ApplicationCommandData, + guildId: Snowflake + ): Promise<BushApplicationCommand>; + public fetch( + id: Snowflake, + options: FetchApplicationCommandOptions & { guildId: Snowflake } + ): Promise<BushApplicationCommand>; + public fetch(id: Snowflake, options?: FetchApplicationCommandOptions): Promise<ApplicationCommandType>; + public fetch( + id?: Snowflake, + options?: FetchApplicationCommandOptions + ): Promise<Collection<Snowflake, ApplicationCommandType>>; + public set(commands: ApplicationCommandData[]): Promise<Collection<Snowflake, ApplicationCommandType>>; + public set(commands: ApplicationCommandData[], guildId: Snowflake): Promise<Collection<Snowflake, BushApplicationCommand>>; + private static transformCommand(command: ApplicationCommandData): unknown; +} diff --git a/src/lib/extensions/discord.js/BushApplicationCommandManager.ts b/src/lib/extensions/discord.js/BushApplicationCommandManager.ts deleted file mode 100644 index a8abb6f..0000000 --- a/src/lib/extensions/discord.js/BushApplicationCommandManager.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { ApplicationCommandManager, GuildResolvable, Snowflake } from 'discord.js'; -import { BushClient } from '../discord-akairo/BushClient'; -import { BushApplicationCommand } from './BushApplicationCommand'; -import { BushApplicationCommandPermissionsManager } from './BushApplicationCommandPermissionsManager'; -import { BushGuildResolvable } from './BushCommandInteraction'; - -export type BushApplicationCommandResolvable = BushApplicationCommand | Snowflake; - -export class BushApplicationCommandManager< - ApplicationCommandType = BushApplicationCommand<{ guild: BushGuildResolvable }>, - PermissionsOptionsExtras = { guild: GuildResolvable }, - PermissionsGuildType = null -> extends ApplicationCommandManager<ApplicationCommandType, PermissionsOptionsExtras, PermissionsGuildType> { - public declare permissions: BushApplicationCommandPermissionsManager< - { command?: BushApplicationCommandResolvable } & PermissionsOptionsExtras, - { command: BushApplicationCommandResolvable } & PermissionsOptionsExtras, - PermissionsOptionsExtras, - PermissionsGuildType, - null - >; - - public constructor(client: BushClient, iterable?: Iterable<any>) { - super(client, iterable); - } -} diff --git a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts new file mode 100644 index 0000000..443fee2 --- /dev/null +++ b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts @@ -0,0 +1,54 @@ +import { + ApplicationCommand, + ApplicationCommandManager, + ApplicationCommandPermissionData, + ApplicationCommandPermissions, + BaseManager, + Collection, + GuildApplicationCommandManager, + GuildApplicationCommandPermissionData, + Snowflake +} from 'discord.js'; +import { BushClient, BushRoleResolvable, BushUserResolvable } from '../discord-akairo/BushClient'; + +export class BushApplicationCommandPermissionsManager< + BaseOptions, + FetchSingleOptions, + FullPermissionsOptions, + GuildType, + CommandIdType +> extends BaseManager { + public constructor(manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand); + public declare readonly client: BushClient; + public commandId: CommandIdType; + public guild: GuildType; + public guildId: Snowflake | null; + public manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand; + public add( + options: FetchSingleOptions & { permissions: ApplicationCommandPermissionData[] } + ): Promise<ApplicationCommandPermissions[]>; + public has(options: FetchSingleOptions & { permissionId: BushUserResolvable | BushRoleResolvable }): Promise<boolean>; + public fetch(options: FetchSingleOptions): Promise<ApplicationCommandPermissions[]>; + public fetch(options: BaseOptions): Promise<Collection<Snowflake, ApplicationCommandPermissions[]>>; + public remove( + options: + | (FetchSingleOptions & { + users: BushUserResolvable | BushUserResolvable[]; + roles?: BushRoleResolvable | BushRoleResolvable[]; + }) + | (FetchSingleOptions & { + users?: BushUserResolvable | BushUserResolvable[]; + roles: BushRoleResolvable | BushRoleResolvable[]; + }) + ): Promise<ApplicationCommandPermissions[]>; + public set( + options: FetchSingleOptions & { permissions: ApplicationCommandPermissionData[] } + ): Promise<ApplicationCommandPermissions[]>; + public set( + options: FullPermissionsOptions & { + fullPermissions: GuildApplicationCommandPermissionData[]; + } + ): Promise<Collection<Snowflake, ApplicationCommandPermissions[]>>; + private permissionsPath(guildId: Snowflake, commandId?: Snowflake): unknown; + private static transformPermissions(permissions: ApplicationCommandPermissionData, received?: boolean): unknown; +} diff --git a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts deleted file mode 100644 index 3a98833..0000000 --- a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ApplicationCommand, - ApplicationCommandManager, - ApplicationCommandPermissionsManager, - GuildApplicationCommandManager -} from 'discord.js'; -import { BushClient } from '../discord-akairo/BushClient'; -import { BushApplicationCommand } from './BushApplicationCommand'; -import { BushApplicationCommandManager } from './BushApplicationCommandManager'; -import { BushGuildApplicationCommandManager } from './BushGuildApplicationCommandManager'; - -export class BushApplicationCommandPermissionsManager< - BaseOptions, - FetchSingleOptions, - FullPermissionsOptions, - GuildType, - CommandIdType -> extends ApplicationCommandPermissionsManager< - BaseOptions, - FetchSingleOptions, - FullPermissionsOptions, - GuildType, - CommandIdType -> { - public declare client: BushClient; - public declare manager: BushApplicationCommandManager | BushGuildApplicationCommandManager | BushApplicationCommand; - - public constructor(manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand) { - super(manager); - } -} diff --git a/src/lib/extensions/discord.js/BushClientEvents.d.ts b/src/lib/extensions/discord.js/BushClientEvents.d.ts new file mode 100644 index 0000000..6c1fec5 --- /dev/null +++ b/src/lib/extensions/discord.js/BushClientEvents.d.ts @@ -0,0 +1,6 @@ +import { ClientEvents } from 'discord.js'; +import { BushMessage } from './BushMessage'; + +export interface BushClientEvents extends ClientEvents { + messageCreate: [message: BushMessage]; +} diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts index 9d618ec..dd41dad 100644 --- a/src/lib/extensions/discord.js/BushGuild.ts +++ b/src/lib/extensions/discord.js/BushGuild.ts @@ -1,12 +1,13 @@ import { Guild, User } from 'discord.js'; -import { ModLogType } from '../..'; +import { BushGuildMember, ModLogType } from '../..'; import { Guild as GuildDB, GuildModel } from '../../models/Guild'; import { BushClient, BushUserResolvable } from '../discord-akairo/BushClient'; +import { BushGuildMemberManager } from './BushGuildMemberManager'; export class BushGuild extends Guild { public declare readonly client: BushClient; - // I cba to do this - //// public declare members: GuildMemberManager; + public declare readonly me: BushGuildMember | null; + public declare members: BushGuildMemberManager; public constructor(client: BushClient, data: unknown) { super(client, data); } diff --git a/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.d.ts b/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.d.ts new file mode 100644 index 0000000..c0400ce --- /dev/null +++ b/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.d.ts @@ -0,0 +1,18 @@ +/* eslint-disable @typescript-eslint/ban-types */ +import { ApplicationCommandData, BaseFetchOptions, Collection, Snowflake } from 'discord.js'; +import { BushApplicationCommandResolvable, BushClient } from '../discord-akairo/BushClient'; +import { BushApplicationCommand } from './BushApplicationCommand'; +import { BushApplicationCommandManager } from './BushApplicationCommandManager'; +import { BushGuild } from './BushGuild'; + +export class BushGuildApplicationCommandManager extends BushApplicationCommandManager<BushApplicationCommand, {}, BushGuild> { + public constructor(guild: BushGuild, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public guild: BushGuild; + public create(command: ApplicationCommandData): Promise<BushApplicationCommand>; + public delete(command: BushApplicationCommandResolvable): Promise<BushApplicationCommand | null>; + public edit(command: BushApplicationCommandResolvable, data: ApplicationCommandData): Promise<BushApplicationCommand>; + public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<BushApplicationCommand>; + public fetch(id?: undefined, options?: BaseFetchOptions): Promise<Collection<Snowflake, BushApplicationCommand>>; + public set(commands: ApplicationCommandData[]): Promise<Collection<Snowflake, BushApplicationCommand>>; +} diff --git a/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.ts b/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.ts deleted file mode 100644 index 3dd79a4..0000000 --- a/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { GuildApplicationCommandManager } from 'discord.js'; -import { BushGuild } from './BushGuild'; - -export class BushGuildApplicationCommandManager extends GuildApplicationCommandManager { - public declare guild: BushGuild; - public constructor(guild: BushGuild, iterable?: Iterable<any>) { - super(guild, iterable); - } -} diff --git a/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.d.ts b/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.d.ts new file mode 100644 index 0000000..6e36292 --- /dev/null +++ b/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.d.ts @@ -0,0 +1,19 @@ +import { Collection, DataManager, Snowflake } from 'discord.js'; +import { BushClient, BushRoleResolvable } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; +import { BushGuildEmoji } from './BushGuildEmoji'; +import { BushRole } from './BushRole'; + +export class BushGuildEmojiRoleManager extends DataManager<Snowflake, BushRole, BushRoleResolvable> { + public constructor(emoji: BushGuildEmoji); + public declare readonly client: BushClient; + public emoji: BushGuildEmoji; + public guild: BushGuild; + public add( + roleOrRoles: BushRoleResolvable | readonly BushRoleResolvable[] | Collection<Snowflake, BushRole> + ): Promise<BushGuildEmoji>; + public set(roles: readonly BushRoleResolvable[] | Collection<Snowflake, BushRole>): Promise<BushGuildEmoji>; + public remove( + roleOrRoles: BushRoleResolvable | readonly BushRoleResolvable[] | Collection<Snowflake, BushRole> + ): Promise<BushGuildEmoji>; +} diff --git a/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts b/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts deleted file mode 100644 index 00afb25..0000000 --- a/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Collection, GuildEmojiRoleManager, Snowflake } from 'discord.js'; -import { BushGuild } from './BushGuild'; -import { BushGuildEmoji } from './BushGuildEmoji'; -import { BushRole } from './BushRole'; - -export class BushGuildEmojiRoleManager extends GuildEmojiRoleManager { - public declare emoji: BushGuildEmoji; - public declare guild: BushGuild; - public declare cache: Collection<Snowflake, BushRole>; - public constructor(emoji: BushGuildEmoji) { - super(emoji); - } -} diff --git a/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts b/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts new file mode 100644 index 0000000..96b99e5 --- /dev/null +++ b/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts @@ -0,0 +1,35 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { + BanOptions, + CachedManager, + Collection, + FetchMemberOptions, + FetchMembersOptions, + GuildMember, + GuildMemberEditData, + GuildPruneMembersOptions, + GuildSearchMembersOptions, + Snowflake, + User, + UserResolvable +} from 'discord.js'; +import { BushClient, BushGuildMemberResolvable, BushUserResolvable } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; +import { BushGuildMember } from './BushGuildMember'; + +export class BushGuildMemberManager extends CachedManager<Snowflake, BushGuildMember, BushGuildMemberResolvable> { + public constructor(guild: BushGuild, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public guild: BushGuild; + public ban(user: BushUserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>; + public edit(user: BushUserResolvable, data: GuildMemberEditData, reason?: string): Promise<void>; + public fetch( + options: UserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: UserResolvable }) + ): Promise<GuildMember>; + public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>; + public kick(user: UserResolvable, reason?: string): Promise<BushGuildMember | User | Snowflake>; + public prune(options: GuildPruneMembersOptions & { dry?: false; count: false }): Promise<null>; + public prune(options?: GuildPruneMembersOptions): Promise<number>; + public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>; + public unban(user: UserResolvable, reason?: string): Promise<User>; +} diff --git a/src/lib/extensions/discord.js/BushGuildMemberManager.ts b/src/lib/extensions/discord.js/BushGuildMemberManager.ts deleted file mode 100644 index dbc2da5..0000000 --- a/src/lib/extensions/discord.js/BushGuildMemberManager.ts +++ /dev/null @@ -1,11 +0,0 @@ -// /* eslint-disable @typescript-eslint/no-explicit-any */ -// import { GuildMemberManager } from 'discord.js'; -// import { BushGuild } from './BushGuild'; - -// export class BushGuildMemberManager extends GuildMemberManager { -// public guild: BushGuild; - -// public constructor(guild: BushGuild, iterable?: Iterable<any>) { -// super(guild, iterable); -// } -// } diff --git a/src/lib/extensions/discord.js/BushMessageManager.d.ts b/src/lib/extensions/discord.js/BushMessageManager.d.ts new file mode 100644 index 0000000..bf795ad --- /dev/null +++ b/src/lib/extensions/discord.js/BushMessageManager.d.ts @@ -0,0 +1,33 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { + BaseFetchOptions, + CachedManager, + ChannelLogsQueryOptions, + Collection, + EmojiIdentifierResolvable, + MessageEditOptions, + MessagePayload, + Snowflake, + TextBasedChannelFields +} from 'discord.js'; +import { BushClient, BushMessageResolvable } from '../discord-akairo/BushClient'; +import { BushDMChannel } from './BushDMChannel'; +import { BushMessage } from './BushMessage'; +import { BushTextChannel } from './BushTextChannel'; +import { BushThreadChannel } from './BushThreadChannel'; + +export class BushMessageManager extends CachedManager<Snowflake, BushMessage, BushMessageResolvable> { + public constructor(channel: BushTextChannel | BushDMChannel | BushThreadChannel, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public channel: TextBasedChannelFields; + public cache: Collection<Snowflake, BushMessage>; + public crosspost(message: BushMessageResolvable): Promise<BushMessage>; + public delete(message: BushMessageResolvable): Promise<void>; + public edit(message: BushMessageResolvable, options: MessagePayload | MessageEditOptions): Promise<BushMessage>; + public fetch(message: Snowflake, options?: BaseFetchOptions): Promise<BushMessage>; + public fetch(options?: ChannelLogsQueryOptions, cacheOptions?: BaseFetchOptions): Promise<Collection<Snowflake, BushMessage>>; + public fetchPinned(cache?: boolean): Promise<Collection<Snowflake, BushMessage>>; + public react(message: BushMessageResolvable, emoji: EmojiIdentifierResolvable): Promise<void>; + public pin(message: BushMessageResolvable): Promise<void>; + public unpin(message: BushMessageResolvable): Promise<void>; +} diff --git a/src/lib/extensions/discord.js/BushMessageManager.ts b/src/lib/extensions/discord.js/BushMessageManager.ts deleted file mode 100644 index 181808a..0000000 --- a/src/lib/extensions/discord.js/BushMessageManager.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { Collection, MessageManager, Snowflake } from 'discord.js'; -import { BushClient } from '../discord-akairo/BushClient'; -import { BushDMChannel } from './BushDMChannel'; -import { BushMessage } from './BushMessage'; -import { BushTextChannel } from './BushTextChannel'; -import { BushThreadChannel } from './BushThreadChannel'; - -export class BushMessageManager extends MessageManager { - public declare readonly client: BushClient; - public declare cache: Collection<Snowflake, BushMessage>; - public constructor(channel: BushTextChannel | BushDMChannel | BushThreadChannel, iterable?: Iterable<any>) { - super(channel, iterable); - } -} diff --git a/src/lib/extensions/discord.js/BushThreadManager.d.ts b/src/lib/extensions/discord.js/BushThreadManager.d.ts new file mode 100644 index 0000000..6b8250b --- /dev/null +++ b/src/lib/extensions/discord.js/BushThreadManager.d.ts @@ -0,0 +1,25 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { + BaseFetchOptions, + CachedManager, + FetchArchivedThreadOptions, + FetchThreadsOptions, + Snowflake, + ThreadChannelResolvable, + ThreadCreateOptions +} from 'discord.js'; +import { BushClient, BushFetchedThreads, BushThreadChannelResolvable } from '../discord-akairo/BushClient'; +import { BushNewsChannel } from './BushNewsChannel'; +import { BushTextChannel } from './BushTextChannel'; +import { BushThreadChannel } from './BushThreadChannel'; + +export class BushThreadManager<AllowedThreadType> extends CachedManager<Snowflake, BushThreadChannel, ThreadChannelResolvable> { + public constructor(channel: BushTextChannel | BushNewsChannel, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public channel: BushTextChannel | BushNewsChannel; + public create(options: ThreadCreateOptions<AllowedThreadType>): Promise<BushThreadChannel>; + public fetch(options: BushThreadChannelResolvable, cacheOptions?: BaseFetchOptions): Promise<BushThreadChannel | null>; + public fetch(options?: FetchThreadsOptions, cacheOptions?: { cache?: boolean }): Promise<BushFetchedThreads>; + public fetchArchived(options?: FetchArchivedThreadOptions, cache?: boolean): Promise<BushFetchedThreads>; + public fetchActive(cache?: boolean): Promise<BushFetchedThreads>; +} diff --git a/src/lib/extensions/discord.js/BushThreadManager.ts b/src/lib/extensions/discord.js/BushThreadManager.ts deleted file mode 100644 index 50eaa2d..0000000 --- a/src/lib/extensions/discord.js/BushThreadManager.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { ThreadManager } from 'discord.js'; -import { BushNewsChannel } from './BushNewsChannel'; -import { BushTextChannel } from './BushTextChannel'; - -export class BushThreadManager<AllowedThreadType> extends ThreadManager<AllowedThreadType> { - public declare channel: BushTextChannel | BushNewsChannel; - public constructor(channel: BushTextChannel | BushNewsChannel, iterable?: Iterable<any>) { - super(channel, iterable); - } -} diff --git a/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts b/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts new file mode 100644 index 0000000..ba9b90b --- /dev/null +++ b/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts @@ -0,0 +1,15 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +import { CachedManager, Collection, Snowflake, ThreadChannel, ThreadMember, UserResolvable } from 'discord.js'; +import { BushClient, BushThreadMemberResolvable } from '../discord-akairo/BushClient'; +import { BushThreadChannel } from './BushThreadChannel'; +import { BushThreadMember } from './BushThreadMember'; + +export class BushThreadMemberManager extends CachedManager<Snowflake, BushThreadMember, BushThreadMemberResolvable> { + public constructor(thread: BushThreadChannel, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public thread: ThreadChannel; + public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>; + public fetch(cache?: boolean): Promise<Collection<Snowflake, ThreadMember>>; + public remove(id: Snowflake | '@me', reason?: string): Promise<Snowflake>; +} diff --git a/src/lib/extensions/discord.js/BushThreadMemberManager.ts b/src/lib/extensions/discord.js/BushThreadMemberManager.ts deleted file mode 100644 index e585ee7..0000000 --- a/src/lib/extensions/discord.js/BushThreadMemberManager.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/no-empty-interface */ -import { ThreadMemberManager } from 'discord.js'; -import { BushClient } from '../discord-akairo/BushClient'; -import { BushThreadChannel } from './BushThreadChannel'; - -export class BushThreadMemberManager extends ThreadMemberManager { - public declare thread: BushThreadChannel; - public declare readonly client: BushClient; - - public constructor(thread: BushThreadChannel, iterable?: Iterable<unknown>) { - super(thread, iterable); - } -} |