gluon
    Preparing search index...

    Class default

    Hierarchy

    • TypedEmitter<ClientEvents>
      • default

    Implements

    • Client
    Index

    Constructors

    • Creates the client and sets the default options.

      Parameters

      • options: ClientOptions

        The options to pass to the client.

        • cacheMessages

          Whether to cache messages.

        • cacheUsers

          Whether to cache users.

        • cacheMembers

          Whether to cache members.

        • cacheChannels

          Whether to cache channels.

        • cacheGuilds

          Whether to cache guilds.

        • cacheVoiceStates

          Whether to cache voice states.

        • cacheRoles

          Whether to cache roles.

        • cacheScheduledEvents

          Whether to cache scheduled events.

        • cacheEmojis

          Whether to cache emojis.

        • cacheInvites

          Whether to cache invites.

        • defaultMessageExpiry

          The default expiry time for messages.

        • defaultUserExpiry

          The default expiry time for users.

        • intents

          The intents to use when connecting.

        • totalShards

          The total number of shards to manage.

        • shardIds

          The ids of the shards to manage.

        • sessionData

          The session data for the client.

        • initCache

          The initial cache data for the client.

        • softRestartFunction

          The function to call when a soft restart is needed.

      Returns default

    Properties

    _cacheOptions: GluonCacheOptions
    _defaultGuildCacheOptions: GuildCacheOptions
    request: any
    defaultMaxListeners: number

    Accessors

    • get guilds(): GuildManager

      The guild manager for this client.

      Returns GuildManager

    • get initialized(): boolean

      Returns boolean

    • get intents(): number

      The intents that this client is using.

      Returns number

    • get ready(): boolean

      Returns boolean

    • get sessionData(): any[]

      The session data for this client.

      Returns any[]

    • get shardIds(): number[]

      The ids of the shards that this client is managing.

      Returns number[]

    • get totalShards(): number

      The total number of shards that this client is managing.

      Returns number

    • get user(): User

      Returns User

    • set user(user: User): void

      Parameters

      • user: User

      Returns void

    • get users(): UserManager

      The user manager for this client.

      Returns UserManager

    Methods

    • Outputs a debug message if NODE_ENV=development.

      Parameters

      • status: GluonDebugLevels

        The debug status level.

      • message: string

        The message to emit.

      Returns void

    • Type Parameters

      • U extends keyof ClientEvents

      Parameters

      • event: U
      • listener: ClientEvents[U]

      Returns this

    • Bundles all guilds.

      Returns GuildCacheJSON[]

    • Monitors the current process.

      Returns ClientProcessData

    • Creates an emoji for this client.

      Parameters

      • emoji: { image: string; name: string }

        The emoji to create.

        • image: string

          The image of the emoji (base64, should start with "data:image/png;base64,").

        • name: string

          The name of the emoji.

      Returns Promise<any>

    • Type Parameters

      • U extends keyof ClientEvents

      Parameters

      • event: U
      • ...args: Parameters<ClientEvents[U]>

      Returns boolean

    • Type Parameters

      • U extends keyof ClientEvents

      Returns U[]

    • Fetches the emojis for this client.

      Returns Promise<APIEmoji[]>

    • Counts how many items are in each cache.

      Returns ClientCacheCounts

    • Returns number

    • Counts how many members are in all of Quark's servers.

      Returns number

    • Stops all shards.

      Returns void

    • Parameters

      • type: keyof ClientEvents

      Returns number

    • Type Parameters

      • U extends keyof ClientEvents

      Parameters

      • type: U

      Returns ClientEvents[U][]

    • Initiates the login sequence

      Parameters

      • token: string

        The authorization token

      Returns void

    • Type Parameters

      • U extends keyof ClientEvents

      Parameters

      • event: U
      • listener: ClientEvents[U]

      Returns this

    • Type Parameters

      • U extends keyof ClientEvents

      Parameters

      • event: U
      • listener: ClientEvents[U]

      Returns this

    • Type Parameters

      • U extends keyof ClientEvents

      Parameters

      • event: U
      • listener: ClientEvents[U]

      Returns this

    • Type Parameters

      • U extends keyof ClientEvents

      Parameters

      • event: U
      • listener: ClientEvents[U]

      Returns this

    • Type Parameters

      • U extends keyof ClientEvents

      Parameters

      • event: U
      • listener: ClientEvents[U]

      Returns this

    • Type Parameters

      • U extends keyof ClientEvents

      Parameters

      • type: U

      Returns ClientEvents[U][]

    • Parameters

      • Optionalevent: keyof ClientEvents

      Returns this

    • Type Parameters

      • U extends keyof ClientEvents

      Parameters

      • event: U
      • listener: ClientEvents[U]

      Returns this

    • Returns void

    • Parameters

      • n: number

      Returns this

    • Returns void

    • Sets the bot's status across all shards.

      Parameters

      • status: { afk?: boolean; name: string; since?: number; status?: string; type?: number }

        Status options.

        • Optionalafk?: boolean

          Whether the bot is afk.

        • name: string

          The bot's new status.

        • Optionalsince?: number

          The time since the bot has been afk.

        • Optionalstatus?: string

          The bot's status.

        • Optionaltype?: number

          The type of status.

      Returns void

    • The function to call when a soft restart is needed.

      Returns void