aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts
blob: 7bdad8311dc7537972645bfa8f7d243d6cb60833 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* eslint-disable @typescript-eslint/no-explicit-any */
import {
	AddGuildMemberOptions,
	BanOptions,
	CachedManager,
	Collection,
	FetchMemberOptions,
	FetchMembersOptions,
	GuildMember,
	GuildMemberEditData,
	GuildPruneMembersOptions,
	GuildSearchMembersOptions,
	Snowflake,
	User
} 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 add(
		user: BushUserResolvable,
		options: AddGuildMemberOptions & { fetchWhenExisting: false }
	): Promise<GuildMember | null>;
	public add(user: BushUserResolvable, options: AddGuildMemberOptions): Promise<GuildMember>;
	public ban(user: BushUserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>;
	public edit(user: BushUserResolvable, data: GuildMemberEditData, reason?: string): Promise<void>;
	public fetch(
		options: BushUserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: BushUserResolvable })
	): Promise<GuildMember>;
	public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
	public kick(user: BushUserResolvable, 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: BushUserResolvable, reason?: string): Promise<User>;
}