Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShardClient

Shard Client, represents one gateway connection

Hierarchy

  • EventSpewer
    • ShardClient

Index

Constructors

constructor

Properties

_killed

_killed: boolean = false

application

application: null | Oauth2Application = null

Readonly applications

applications: Applications

Readonly channels

channels: Channels

cluster

cluster: null | ClusterClient = null

commandClient

commandClient: null | CommandClient = null

Readonly connectedAccounts

connectedAccounts: ConnectedAccounts

Readonly emojis

emojis: Emojis

gateway

gateway: Socket

detritus-client-socket's Gateway Socket

gatewayHandler

gatewayHandler: GatewayHandler

Our Dispatch Handler

Readonly guilds

guilds: Guilds

imageFormat

imageFormat: ImageFormats = ...

Default Image Format to use for any url getters

interactionCommandClient

interactionCommandClient: null | InteractionCommandClient = null

Readonly interactions

interactions: Interactions

Readonly members

members: Members

Readonly messages

messages: Messages

Readonly notes

notes: Notes

owners

owners: BaseCollection<string, User> = ...

If this is a bot, this will be filled with it's application owner or all of the application's team owners If this is a user, this will only include the user object Only fills once we receive the Ready payload

Readonly presences

presences: Presences

ran

ran: boolean = false

If the client is ran or not

Readonly relationships

relationships: Relationships

Optional requiredAction

requiredAction: null | string

(Users only) if the client requires an action (like the captcha overlay)

rest

detritus-client-rest's Rest Client, but wrapped over

Readonly roles

roles: Roles

Readonly sessions

sessions: Sessions

Readonly stageInstances

stageInstances: StageInstances

Readonly stickers

stickers: Stickers

token

token: string

our token

Readonly typings

user

user: null | UserMe = null

Us, only fills once we received the Ready payload from the gateway

Readonly users

users: Users

Readonly voiceCalls

voiceCalls: VoiceCalls

Readonly voiceConnections

voiceConnections: VoiceConnections

Readonly voiceStates

voiceStates: VoiceStates

Static Readonly captureRejectionSymbol

captureRejectionSymbol: typeof captureRejectionSymbol

Static captureRejections

captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Static defaultMaxListeners

defaultMaxListeners: number

Static Readonly errorMonitor

errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Accessors

applicationId

  • get applicationId(): string

clientId

  • get clientId(): string

isBot

  • get isBot(): boolean

killed

  • get killed(): boolean

shardCount

  • get shardCount(): number

shardId

  • get shardId(): number

userId

  • get userId(): string

Methods

_mergeOauth2Application

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): ShardClient
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ShardClient

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getMaxListeners

  • getMaxListeners(): number
  • Returns number

hasEventListener

  • hasEventListener(name: string | symbol): boolean
  • Parameters

    • name: string | symbol

    Returns boolean

hookComponents

isOwner

  • isOwner(userId: string): boolean

kill

  • kill(error?: Error): void

listenerCount

  • listenerCount(event: string | symbol): number
  • Parameters

    • event: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): ShardClient
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns ShardClient

on

once