Fix using before initialization.
This commit is contained in:
parent
7d441688e2
commit
28734cea17
1 changed files with 4 additions and 4 deletions
|
@ -105,10 +105,6 @@ export class Client extends EventEmitter {
|
||||||
_decoratedSlashModules?: SlashModule[]
|
_decoratedSlashModules?: SlashModule[]
|
||||||
_id?: string
|
_id?: string
|
||||||
|
|
||||||
private readonly _untypedOn = this.on
|
|
||||||
|
|
||||||
private readonly _untypedEmit = this.emit
|
|
||||||
|
|
||||||
public on = <K extends string>(event: K, listener: ClientEvents[K]): this =>
|
public on = <K extends string>(event: K, listener: ClientEvents[K]): this =>
|
||||||
this._untypedOn(event, listener)
|
this._untypedOn(event, listener)
|
||||||
|
|
||||||
|
@ -117,6 +113,10 @@ export class Client extends EventEmitter {
|
||||||
...args: Parameters<ClientEvents[K]>
|
...args: Parameters<ClientEvents[K]>
|
||||||
): boolean => this._untypedEmit(event, ...args)
|
): boolean => this._untypedEmit(event, ...args)
|
||||||
|
|
||||||
|
private readonly _untypedOn = this.on
|
||||||
|
|
||||||
|
private readonly _untypedEmit = this.emit
|
||||||
|
|
||||||
/** Shard on which this Client is */
|
/** Shard on which this Client is */
|
||||||
shard: number = 0
|
shard: number = 0
|
||||||
/** Shard Manager of this Client if Sharded */
|
/** Shard Manager of this Client if Sharded */
|
||||||
|
|
Loading…
Reference in a new issue