class Client

export declare class Client extends AsyncEventEmitter<MappedEvents>


{ rest, gateway }: ClientOptions

Constructs a new instance of the Client class

api : API

gateway : Gateway

rest : REST

requestGuildMembers() : Promise<{ members: APIGuildMember[]; nonce: string; notFound: unknown[]; presences: GatewayGuildMembersChunkPresence[]; }>

Requests guild members from the gateway.

Examples:Requesting specific members from a guild
const { members } = await client.requestGuildMembers({ guild_id: '1234567890', user_ids: ['9876543210'] });

See also:

requestGuildMembersIterator() : AsyncGenerator<{ members: APIGuildMember[]; nonce: string; notFound: unknown[] | null; presences: GatewayGuildMembersChunkPresence[] | null; chunkIndex: number; chunkCount: number; }, void, unknown>

Requests guild members from the gateway and returns an async iterator that yields the data from each guild members chunk event.

Examples:Requesting all members from a guild
for await (const { members } of client.requestGuildMembersIterator({ guild_id: '1234567890', query: '', limit: 0 })) {

See also:

updatePresence() : Promise<void>

Updates the presence of the bot user

updateVoiceState() : Promise<void>

Updates the voice state of the bot user

See also: