You are reading the documentation for the next version of discord.js. Documentation for v13/v14+ has been moved to old.discordjs.dev

Client

export declare class Client extends AsyncEventEmitter<ManagerShardEventsMap>
export declare class Client extends AsyncEventEmitter<ManagerShardEventsMap>

No summary provided.

Extends

AsyncEventEmitter<ManagerShardEventsMap>
constructor({ rest, gateway })
Constructs a new instance of the Client class
NameTypeOptionalDescription
{ rest, gateway }ClientOptionsNoNone
Readonly
api:API
Readonly
gateway:Gateway
Readonly
rest:REST
requestGuildMembers(options, timeout?):Promise<RequestGuildMembersResult>
NameTypeOptionalDescription
optionsGatewayRequestGuildMembersDataNoThe options for the request
timeoutnumberYesThe timeout for waiting for each guild members chunk event
updatePresence(shardId, options):Promise<void>
Updates the presence of the bot user
NameTypeOptionalDescription
shardIdnumberNoThe id of the shard to update the presence in
optionsGatewayPresenceUpdateDataNoThe options for updating the presence
updateVoiceState(options):Promise<void>
NameTypeOptionalDescription
optionsGatewayVoiceStateUpdateDataNoThe options for updating the voice state