Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Worker<{ DEBUG: string }>
    • SingleWorker

Index

Constructors

constructor

Properties

api

api: RestManager = ...

Rest manager

cacheManager

cacheManager: CacheManager

channels

channels: Collection<string, APIChannel> = ...

Cached channels

commands

commands: CommandHandler = ...

Command handler

comms

comms: any = ...

Thread communications

guildRoles

guildRoles: Collection<string, Collection<string, APIRole>> = ...

Cached roles

guilds

guilds: Collection<string, CachedGuild> = ...

Cached guilds

members

members: Collection<string, Collection<string, GatewayGuildMemberAddDispatchData>> = ...

Cached members

options

options: CompleteBotOptions = ...

Bot options

selfMember

selfMember: Collection<string, GatewayGuildMemberAddDispatchData> = ...

Cached self members

sharder

sharder: SingleSharder = ...

shards

shards: Collection<number, Shard> = ...

All shards on this cluster

Optional status

status: GatewayPresenceUpdateData

The status that the worker will retain when a shard restarts, to change use Worker.setStatus() for no unintended side affects

user

user: APIUser = ...

Self user

users

users: Collection<string, APIUser> = ...

Cached users

voiceStates

voiceStates: Collection<string, CachedVoiceState> = ...

Cached voice states

Accessors

ready

  • get ready(): boolean

Methods

_beginSingleton

  • _beginSingleton(): Promise<void>

_waitForShard

  • _waitForShard(shard: Shard): Promise<{ err: boolean }>

debug

  • debug(msg: any): void

getMembers

  • getMembers(guildId: string): Promise<Collection<any, APIGuildMember>>

guildShard

  • guildShard(guildId: string): Shard

log

  • log(...data: any[]): void

setStatus

  • setStatus(type: "playing" | "streaming" | "listening" | "watching" | "competing", name: string, status?: "idle" | "online" | "dnd" | "offline" | "invisible", url?: string): void
  • Sets the status of the client

    example

    worker.setStatus('playing', 'Rocket League', 'online') // Playing Rocket League // Twitch streams worker.setStatus('streaming', 'Rocket League', 'online', 'https://twitch.com/jpbberry')

    Parameters

    • type: "playing" | "streaming" | "listening" | "watching" | "competing"

      Type of status, e.g "playing" is "Playing Game!"

    • name: string

      Name of status, in this case Game

    • status: "idle" | "online" | "dnd" | "offline" | "invisible" = 'online'

      Status type

    • Optional url: string

      Optional url for twitch stream

    Returns void

start

  • start(): Promise<void>

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Static method

Generated using TypeDoc