@@ -87,8 +87,8 @@ export class Client extends Discord.Client
87
87
public readonly tsNode : boolean ;
88
88
89
89
// Internals
90
- public readonly _middleware : MiddlewareFunction [ ] ;
91
- public readonly _customResolvers : ResolverConstructor [ ] ;
90
+ public readonly middleware : MiddlewareFunction [ ] ;
91
+ public readonly customResolvers : ResolverConstructor [ ] ;
92
92
93
93
// eslint-disable-next-line complexity
94
94
public constructor ( options : YAMDBFOptions , clientOptions ?: ClientOptions )
@@ -245,7 +245,7 @@ export class Client extends Discord.Client
245
245
this . plugins = new PluginLoader ( this , this . _plugins ) ;
246
246
247
247
// Middleware function storage for the client instance
248
- this . _middleware = [ ] ;
248
+ this . middleware = [ ] ;
249
249
250
250
/**
251
251
* Client-specific storage. Also contains a `guilds` Collection property containing
@@ -267,8 +267,8 @@ export class Client extends Discord.Client
267
267
* @type {ResolverLoader }
268
268
*/
269
269
this . resolvers = new ResolverLoader ( this ) ;
270
- this . _customResolvers = options . customResolvers ?? [ ] ;
271
- this . resolvers . _loadResolvers ( ) ;
270
+ this . customResolvers = options . customResolvers ?? [ ] ;
271
+ this . resolvers . loadResolvers ( ) ;
272
272
273
273
/**
274
274
* Whether or not compact mode is enabled
@@ -335,6 +335,7 @@ export class Client extends Discord.Client
335
335
// #region Event handlers
336
336
337
337
// @ts -ignore - Handled via ListenerUtil
338
+ // eslint-disable-next-line @typescript-eslint/naming-convention
338
339
@once ( 'ready' ) private async __onReadyEvent ( ) : Promise < void >
339
340
{
340
341
// Set default owner (OAuth Application owner) if none exists
@@ -359,14 +360,15 @@ export class Client extends Discord.Client
359
360
this . user ! . setActivity ( this . statusText ) ;
360
361
}
361
362
363
+ // eslint-disable-next-line @typescript-eslint/naming-convention
362
364
@once ( 'continue' ) private async __onContinueEvent ( ) : Promise < void >
363
365
{
364
366
await this . _guildStorageLoader . init ( ) ;
365
367
await this . _guildStorageLoader . loadStorages ( ) ;
366
368
await this . _guildStorageLoader . cleanGuilds ( ) ;
367
369
368
370
this . _logger . info ( 'Loading plugins...' ) ;
369
- await this . plugins . _loadPlugins ( ) ;
371
+ await this . plugins . loadPlugins ( ) ;
370
372
371
373
if ( ! this . passive )
372
374
{
@@ -376,11 +378,11 @@ export class Client extends Discord.Client
376
378
this . _commandLoader . loadCommandsFrom ( this . commandsDir ) ;
377
379
}
378
380
379
- this . commands . _checkDuplicateAliases ( ) ;
380
- this . commands . _checkReservedCommandNames ( ) ;
381
+ this . commands . checkDuplicateAliases ( ) ;
382
+ this . commands . checkReservedCommandNames ( ) ;
381
383
382
384
this . _logger . info ( 'Initializing commands...' ) ;
383
- const initSuccess : boolean = await this . commands . _initCommands ( ) ;
385
+ const initSuccess : boolean = await this . commands . initCommands ( ) ;
384
386
this . _logger . info ( `Commands initialized${ initSuccess ? '' : ' with errors' } .` ) ;
385
387
386
388
Lang . loadCommandLocalizations ( ) ;
@@ -413,6 +415,7 @@ export class Client extends Discord.Client
413
415
}
414
416
415
417
// @ts -ignore - Handled via ListenerUtil
418
+ // eslint-disable-next-line @typescript-eslint/naming-convention
416
419
@on ( 'guildCreate' ) private async __onGuildCreateEvent ( guild : Guild ) : Promise < void >
417
420
{
418
421
if ( this . storage . guilds . has ( guild . id ) )
@@ -426,6 +429,7 @@ export class Client extends Discord.Client
426
429
}
427
430
428
431
// @ts -ignore - Handled via ListenerUtil
432
+ // eslint-disable-next-line @typescript-eslint/naming-convention
429
433
@on ( 'guildDelete' ) private __onGuildDeleteEvent ( guild : Guild ) : void
430
434
{
431
435
if ( this . storage . guilds . has ( guild . id ) )
@@ -596,15 +600,15 @@ export class Client extends Discord.Client
596
600
*/
597
601
public use ( func : MiddlewareFunction ) : this
598
602
{
599
- this . _middleware . push ( func ) ;
603
+ this . middleware . push ( func ) ;
600
604
return this ;
601
605
}
602
606
603
607
/**
604
608
* Reload custom commands. Used internally by the `reload` command
605
609
* @private
606
610
*/
607
- public _reloadCustomCommands ( ) : number
611
+ public reloadCustomCommands ( ) : number
608
612
{
609
613
if ( ! this . commandsDir )
610
614
throw new Error ( 'Client is missing `commandsDir`, cannot reload Commands' ) ;
@@ -616,7 +620,7 @@ export class Client extends Discord.Client
616
620
* Reload Events from all registered event source directories
617
621
* @private
618
622
*/
619
- public _reloadEvents ( ) : number
623
+ public reloadEvents ( ) : number
620
624
{
621
625
return this . eventLoader . loadFromSources ( ) ;
622
626
}
0 commit comments