misc fixes n shit
This commit is contained in:
parent
4eaefa3279
commit
099f994335
@ -41,9 +41,10 @@ class BaseClient extends EventEmitter {
|
||||
|
||||
this.logger.status(`Shards spawned, spawned ${this.shardingManager.shards.size} shards. Took ${Date.now() - start} ms`);
|
||||
|
||||
const API = this._options.api.load ? await import('/Documents/My programs/GBot/api/index.js')
|
||||
.catch(() => this.logger.warn(`Error importing API files, continuing without`)) : null;
|
||||
// const API = await import('./api/index.js').catch(() => this.logger.warn(`Error importing API files, continuing without`));
|
||||
// const API = this._options.api.load ? await import('/Documents/My programs/GBot/api/index.js')
|
||||
// .catch(() => this.logger.warn(`Error importing API files, continuing without`)) : null;
|
||||
let API = null;
|
||||
if(this._options.api.load) API = await import('../../api/index.js').catch(() => this.logger.warn(`Error importing API files, continuing without`));
|
||||
if (API) {
|
||||
this.logger.info('Booting up API');
|
||||
const { default: APIManager } = API;
|
||||
|
@ -196,7 +196,7 @@ class DiscordClient extends Client {
|
||||
const result = await this.shard.broadcastEval((client) => client.users.cache.size).catch(() => null);
|
||||
if (!result) return;
|
||||
const userCount = result.reduce((p, v) => p+v, 0);
|
||||
this.user.setActivity(`to ${userCount} users`, { type: 'LISTENING' });
|
||||
this.user.setActivity(`${userCount} users`, { type: 'LISTENING' });
|
||||
},
|
||||
2: async () => {
|
||||
this.user.setActivity("for /help", { type: 'LISTENING' });
|
||||
@ -215,6 +215,10 @@ class DiscordClient extends Client {
|
||||
return this.shard.count === 1;
|
||||
}
|
||||
|
||||
get shardId() {
|
||||
return this.shard.ids[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
@ -312,8 +316,15 @@ class DiscordClient extends Client {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
resolveUsers(...opts) {
|
||||
return this.resolver.resolveUsers(...opts);
|
||||
}
|
||||
|
||||
resolveUser(...opts) {
|
||||
return this.resolver.resolveUser(...opts);
|
||||
}
|
||||
|
||||
get prefix() {
|
||||
return this._options.discord.prefix;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ class Observer extends Component {
|
||||
});
|
||||
|
||||
this.name = options.name;
|
||||
this.priority = options.priority || 1; // Lower is higher
|
||||
this.priority = options.priority || 10; // Lower is higher
|
||||
this.hooks = options.hooks || [];
|
||||
|
||||
this.logger = new Logger(this);
|
||||
|
Loading…
Reference in New Issue
Block a user