Skip to main content

Class: SapphireClient<Ready>

Type parameters

NameType
Readyextends boolean = boolean

Hierarchy

  • Client<Ready>

    SapphireClient

Constructors

constructor

new SapphireClient<Ready>(options)

Type parameters

NameType
Readyextends boolean = boolean

Parameters

NameType
optionsClientOptions

Overrides

Client<Ready\>.constructor

Defined in

projects/framework/src/lib/SapphireClient.ts:264

Properties

application

application: If<Ready, ClientApplication, null>

Inherited from

Client.application

Defined in

node_modules/discord.js/typings/index.d.ts:588


channels

channels: ChannelManager

Inherited from

Client.channels

Defined in

node_modules/discord.js/typings/index.d.ts:589


disableMentionPrefix

Optional disableMentionPrefix: boolean

Defined in

projects/framework/src/lib/SapphireClient.ts:256


emojis

Readonly emojis: BaseGuildEmojiManager

Inherited from

Client.emojis

Defined in

node_modules/discord.js/typings/index.d.ts:590


fetchPrefix

fetchPrefix: SapphirePrefixHook

Overrides

Client.fetchPrefix

Defined in

projects/framework/src/lib/SapphireClient.ts:239


guilds

guilds: GuildManager

Inherited from

Client.guilds

Defined in

node_modules/discord.js/typings/index.d.ts:591


id

id: null | string = null

Overrides

Client.id

Defined in

projects/framework/src/lib/SapphireClient.ts:209


logger

logger: ILogger

Overrides

Client.logger

Defined in

projects/framework/src/lib/SapphireClient.ts:246


options

options: ClientOptions

Inherited from

Client.options

Defined in

node_modules/discord.js/typings/index.d.ts:592


readyAt

readyAt: If<Ready, Date, null>

Inherited from

Client.readyAt

Defined in

node_modules/discord.js/typings/index.d.ts:593


readyTimestamp

Readonly readyTimestamp: If<Ready, number, null>

Inherited from

Client.readyTimestamp

Defined in

node_modules/discord.js/typings/index.d.ts:594


shard

shard: null | ShardClientUtil

Inherited from

Client.shard

Defined in

node_modules/discord.js/typings/index.d.ts:596


stores

stores: StoreRegistry

Overrides

Client.stores

Defined in

projects/framework/src/lib/SapphireClient.ts:262


sweepers

sweepers: Sweepers

Inherited from

Client.sweepers

Defined in

node_modules/discord.js/typings/index.d.ts:595


token

token: If<Ready, string, null | string>

Inherited from

Client.token

Defined in

node_modules/discord.js/typings/index.d.ts:597


uptime

uptime: If<Ready, number, null>

Inherited from

Client.uptime

Defined in

node_modules/discord.js/typings/index.d.ts:598


user

user: If<Ready, ClientUser, null>

Inherited from

Client.user

Defined in

node_modules/discord.js/typings/index.d.ts:599


users

users: UserManager

Inherited from

Client.users

Defined in

node_modules/discord.js/typings/index.d.ts:600


voice

voice: ClientVoiceManager

Inherited from

Client.voice

Defined in

node_modules/discord.js/typings/index.d.ts:601


ws

ws: WebSocketManager

Inherited from

Client.ws

Defined in

node_modules/discord.js/typings/index.d.ts:602


captureRejectionSymbol

Static Readonly captureRejectionSymbol: typeof captureRejectionSymbol

Inherited from

Client.captureRejectionSymbol

Defined in

node_modules/@types/node/ts4.8/events.d.ts:291


captureRejections

Static captureRejections: boolean

Inherited from

Client.captureRejections

Defined in

node_modules/@types/node/ts4.8/events.d.ts:296


defaultMaxListeners

Static defaultMaxListeners: number

Inherited from

Client.defaultMaxListeners

Defined in

node_modules/@types/node/ts4.8/events.d.ts:297


errorMonitor

Static Readonly errorMonitor: typeof errorMonitor

Inherited from

Client.errorMonitor

Defined in

node_modules/@types/node/ts4.8/events.d.ts:290


plugins

Static plugins: PluginManager

Defined in

projects/framework/src/lib/SapphireClient.ts:347

Methods

addListener

addListener(eventName, listener): SapphireClient<Ready>

Parameters

NameType
eventNamestring | symbol
listener(...args: any[]) => void

Returns

SapphireClient<Ready>

Inherited from

Client.addListener

Defined in

node_modules/@types/node/ts4.8/events.d.ts:317


destroy

destroy(): void

Returns

void

Inherited from

Client.destroy

Defined in

node_modules/discord.js/typings/index.d.ts:603


emit

emit<K>(event, ...args): boolean

Type parameters

NameType
Kextends keyof ClientEvents

Parameters

NameType
eventK
...argsClientEvents[K]

Returns

boolean

Inherited from

Client.emit

Defined in

node_modules/discord.js/typings/index.d.ts:631

emit<S>(event, ...args): boolean

Type parameters

NameType
Sextends string | symbol

Parameters

NameType
eventExclude<S, keyof ClientEvents>
...argsunknown[]

Returns

boolean

Inherited from

Client.emit

Defined in

node_modules/discord.js/typings/index.d.ts:632


eventNames

eventNames(): (string | symbol)[]

Returns

(string | symbol)[]

Inherited from

Client.eventNames

Defined in

node_modules/@types/node/ts4.8/events.d.ts:632


fetchGuildPreview

fetchGuildPreview(guild): Promise<GuildPreview>

Parameters

NameType
guildGuildResolvable

Returns

Promise<GuildPreview>

Inherited from

Client.fetchGuildPreview

Defined in

node_modules/discord.js/typings/index.d.ts:604


fetchGuildTemplate

fetchGuildTemplate(template): Promise<GuildTemplate>

Parameters

NameType
templatestring

Returns

Promise<GuildTemplate>

Inherited from

Client.fetchGuildTemplate

Defined in

node_modules/discord.js/typings/index.d.ts:606


fetchGuildWidget

fetchGuildWidget(guild): Promise<Widget>

Parameters

NameType
guildGuildResolvable

Returns

Promise<Widget>

Inherited from

Client.fetchGuildWidget

Defined in

node_modules/discord.js/typings/index.d.ts:611


fetchInvite

fetchInvite(invite, options?): Promise<Invite>

Parameters

NameType
invitestring
options?ClientFetchInviteOptions

Returns

Promise<Invite>

Inherited from

Client.fetchInvite

Defined in

node_modules/discord.js/typings/index.d.ts:605


fetchPremiumStickerPacks

fetchPremiumStickerPacks(): Promise<Collection<string, StickerPack>>

Returns

Promise<Collection<string, StickerPack>>

Inherited from

Client.fetchPremiumStickerPacks

Defined in

node_modules/discord.js/typings/index.d.ts:609


fetchSticker

fetchSticker(id): Promise<Sticker>

Parameters

NameType
idstring

Returns

Promise<Sticker>

Inherited from

Client.fetchSticker

Defined in

node_modules/discord.js/typings/index.d.ts:608


fetchVoiceRegions

fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>

Returns

Promise<Collection<string, VoiceRegion>>

Inherited from

Client.fetchVoiceRegions

Defined in

node_modules/discord.js/typings/index.d.ts:607


fetchWebhook

fetchWebhook(id, token?): Promise<Webhook>

Parameters

NameType
idstring
token?string

Returns

Promise<Webhook>

Inherited from

Client.fetchWebhook

Defined in

node_modules/discord.js/typings/index.d.ts:610


generateInvite

generateInvite(options?): string

Parameters

NameType
options?InviteGenerationOptions

Returns

string

Inherited from

Client.generateInvite

Defined in

node_modules/discord.js/typings/index.d.ts:612


getMaxListeners

getMaxListeners(): number

Returns

number

Inherited from

Client.getMaxListeners

Defined in

node_modules/@types/node/ts4.8/events.d.ts:489


isReady

isReady(): this is Client<true>

Returns

this is Client<true>

Inherited from

Client.isReady

Defined in

node_modules/discord.js/typings/index.d.ts:614


listenerCount

listenerCount(eventName): number

Parameters

NameTypeDescription
eventNamestring | symbol

Returns

number

Inherited from

Client.listenerCount

Defined in

node_modules/@types/node/ts4.8/events.d.ts:579


listeners

listeners(eventName): Function[]

Parameters

NameType
eventNamestring | symbol

Returns

Function[]

Inherited from

Client.listeners

Defined in

node_modules/@types/node/ts4.8/events.d.ts:502


login

login(token?): Promise<string>

Parameters

NameTypeDescription
token?string

Returns

Promise<string>

Overrides

Client.login

Defined in

projects/framework/src/lib/SapphireClient.ts:322


off

off<K>(event, listener): SapphireClient<Ready>

Type parameters

NameType
Kextends keyof ClientEvents

Parameters

NameType
eventK
listener(...args: ClientEvents[K]) => Awaitable<void>

Returns

SapphireClient<Ready>

Inherited from

Client.off

Defined in

node_modules/discord.js/typings/index.d.ts:634

off<S>(event, listener): SapphireClient<Ready>

Type parameters

NameType
Sextends string | symbol

Parameters

NameType
eventExclude<S, keyof ClientEvents>
listener(...args: any[]) => Awaitable<void>

Returns

SapphireClient<Ready>

Inherited from

Client.off

Defined in

node_modules/discord.js/typings/index.d.ts:635


on

on<K>(event, listener): SapphireClient<Ready>

Type parameters

NameType
Kextends keyof ClientEvents

Parameters

NameType
eventK
listener(...args: ClientEvents[K]) => Awaitable<void>

Returns

SapphireClient<Ready>

Inherited from

Client.on

Defined in

node_modules/discord.js/typings/index.d.ts:619

on<S>(event, listener): SapphireClient<Ready>

Type parameters

NameType
Sextends string | symbol

Parameters

NameType
eventExclude<S, keyof ClientEvents>
listener(...args: any[]) => Awaitable<void>

Returns

SapphireClient<Ready>

Inherited from

Client.on

Defined in

node_modules/discord.js/typings/index.d.ts:620


once

once<K>(event, listener): SapphireClient<Ready>

Type parameters

NameType
Kextends keyof ClientEvents

Parameters

NameType
eventK
listener(...args: ClientEvents[K]) => Awaitable<void>

Returns

SapphireClient<Ready>

Inherited from

Client.once

Defined in

node_modules/discord.js/typings/index.d.ts:625

once<S>(event, listener): SapphireClient<Ready>

Type parameters

NameType
Sextends string | symbol

Parameters

NameType
eventExclude<S, keyof ClientEvents>
listener(...args: any[]) => Awaitable<void>

Returns

SapphireClient<Ready>

Inherited from

Client.once

Defined in

node_modules/discord.js/typings/index.d.ts:626


prependListener

prependListener(eventName, listener): SapphireClient<Ready>

Parameters

NameTypeDescription
eventNamestring | symbol
listener(...args: any[]) => void

Returns

SapphireClient<Ready>

Inherited from

Client.prependListener

Defined in

node_modules/@types/node/ts4.8/events.d.ts:597


prependOnceListener

prependOnceListener(eventName, listener): SapphireClient<Ready>

Parameters

NameTypeDescription
eventNamestring | symbol
listener(...args: any[]) => void

Returns

SapphireClient<Ready>

Inherited from

Client.prependOnceListener

Defined in

node_modules/@types/node/ts4.8/events.d.ts:613


rawListeners

rawListeners(eventName): Function[]

Parameters

NameType
eventNamestring | symbol

Returns

Function[]

Inherited from

Client.rawListeners

Defined in

node_modules/@types/node/ts4.8/events.d.ts:532


removeAllListeners

removeAllListeners<K>(event?): SapphireClient<Ready>

Type parameters

NameType
Kextends keyof ClientEvents

Parameters

NameType
event?K

Returns

SapphireClient<Ready>

Inherited from

Client.removeAllListeners

Defined in

node_modules/discord.js/typings/index.d.ts:640

removeAllListeners<S>(event?): SapphireClient<Ready>

Type parameters

NameType
Sextends string | symbol

Parameters

NameType
event?Exclude<S, keyof ClientEvents>

Returns

SapphireClient<Ready>

Inherited from

Client.removeAllListeners

Defined in

node_modules/discord.js/typings/index.d.ts:641


removeListener

removeListener(eventName, listener): SapphireClient<Ready>

Parameters

NameType
eventNamestring | symbol
listener(...args: any[]) => void

Returns

SapphireClient<Ready>

Inherited from

Client.removeListener

Defined in

node_modules/@types/node/ts4.8/events.d.ts:457


setMaxListeners

setMaxListeners(n): SapphireClient<Ready>

Parameters

NameType
nnumber

Returns

SapphireClient<Ready>

Inherited from

Client.setMaxListeners

Defined in

node_modules/@types/node/ts4.8/events.d.ts:483


sweepMessages

sweepMessages(lifetime?): number

Parameters

NameType
lifetime?number

Returns

number

Inherited from

Client.sweepMessages

Defined in

node_modules/discord.js/typings/index.d.ts:616


toJSON

toJSON(): unknown

Returns

unknown

Inherited from

Client.toJSON

Defined in

node_modules/discord.js/typings/index.d.ts:617


getEventListeners

Static getEventListeners(emitter, name): Function[]

Parameters

NameType
emitterEventEmitter | DOMEventTarget
namestring | symbol

Returns

Function[]

Inherited from

Client.getEventListeners

Defined in

node_modules/@types/node/ts4.8/events.d.ts:262


listenerCount

Static listenerCount(emitter, eventName): number

Parameters

NameTypeDescription
emitterEventEmitter
eventNamestring | symbol

Returns

number

Inherited from

Client.listenerCount

Defined in

node_modules/@types/node/ts4.8/events.d.ts:234


on

Static on(emitter, eventName, options?): AsyncIterableIterator<any>

Parameters

NameTypeDescription
emitterEventEmitter-
eventNamestring
options?StaticEventEmitterOptions-

Returns

AsyncIterableIterator<any>

Inherited from

Client.on

Defined in

node_modules/@types/node/ts4.8/events.d.ts:217


once

Static once(emitter, eventName, options?): Promise<any[]>

Parameters

NameType
emitterNodeEventTarget
eventNamestring | symbol
options?StaticEventEmitterOptions

Returns

Promise<any[]>

Inherited from

Client.once

Defined in

node_modules/@types/node/ts4.8/events.d.ts:157

Static once(emitter, eventName, options?): Promise<any[]>

Parameters

NameType
emitterDOMEventTarget
eventNamestring
options?StaticEventEmitterOptions

Returns

Promise<any[]>

Inherited from

Client.once

Defined in

node_modules/@types/node/ts4.8/events.d.ts:158


setMaxListeners

Static setMaxListeners(n?, ...eventTargets): void

Parameters

NameTypeDescription
n?number
...eventTargets(EventEmitter | DOMEventTarget)[]-

Returns

void

Inherited from

Client.setMaxListeners

Defined in

node_modules/@types/node/ts4.8/events.d.ts:280


use

Static use(plugin): typeof SapphireClient

Parameters

NameType
plugintypeof Plugin

Returns

typeof SapphireClient

Defined in

projects/framework/src/lib/SapphireClient.ts:349