Class Client

The primary class for interfacing with Discord.

Hierarchy

Constructors

Properties

application?: ClientApplication

The client's partial application (only set when using a gateway connection).

channelGuildMap: Record<string, string>
gatewayURL: string
groupChannels: Collection<string, RawGroupChannel, GroupChannel, []>
guildShardMap: Record<string, number>
guilds: Collection<string, RawGuild, Guild, []>
options: Required<Omit<ClientOptions, "rest" | "gateway">>
privateChannels: Collection<string, RawPrivateChannel, PrivateChannel, []>
ready: boolean = false
shards: ShardManager
startTime: number = 0
threadGuildMap: Record<string, string>
unavailableGuilds: Collection<string, RawUnavailableGuild, UnavailableGuild, []>

The client's user (only set when using a gateway connection).

users: Collection<string, RawUser, User, []>
voiceConnections: VoiceConnectionManager

Methods

  • Leave a voice channel.

    Returns

    Parameters

    • channelID: string

      The ID of the voice channel to leave.

    Returns Promise<void>