mirror of
https://github.com/musix-org/musix-oss
synced 2024-11-10 02:00:20 +00:00
shard logs
This commit is contained in:
parent
65caded23d
commit
6386a672c5
@ -18,16 +18,17 @@ module.exports = function (client) {
|
||||
}).on('rateLimit', (rateLimitInfo) => {
|
||||
|
||||
}).on('shardDisconnect', (event, id) => {
|
||||
console.log(`Shard ${id} disconnected event ${event}`);
|
||||
client.logs.push(`Shard ${id} disconnected event ${event}`);
|
||||
}).on('shardError', (error, shardId) => {
|
||||
console.log(`Shard ${shardId} error ${error}`);
|
||||
client.logs.push(`Shard ${shardId} error ${error}`);
|
||||
}).on('shardReady', (id, unavailableGuilds) => {
|
||||
console.log(`Shard ${id} ready. Unavailable guilds: ${unavailableGuilds || 0}`);
|
||||
client.logs.push(`Shard ${id} ready. Unavailable guilds: ${unavailableGuilds || 0}`);
|
||||
}).on('shardReconnecting', (id) => {
|
||||
console.log(`shard ${id} reconnecting.`);
|
||||
client.logs.push(`shard ${id} reconnecting.`);
|
||||
}).on('shardResume', (id, replayedEvents) => {
|
||||
console.log(`shard ${id} resume events ${replayedEvents}`);
|
||||
client.logs.push(`shard ${id} resume events ${replayedEvents}`);
|
||||
}).on("warn", (info) => {
|
||||
client.logs.push(`Warn! info: ${info}`);
|
||||
console.log(`Warn! info: ${info}`);
|
||||
});
|
||||
}
|
@ -43,6 +43,7 @@ module.exports = class extends Client {
|
||||
guilds: {},
|
||||
},
|
||||
};
|
||||
this.logs = [];
|
||||
|
||||
fs.readdirSync(path.join(__dirname, "funcs")).forEach((filename) => {
|
||||
this.funcs[filename.slice(0, -3)] = require(`./funcs/${filename}`);
|
||||
|
Loading…
Reference in New Issue
Block a user