mirror of
https://github.com/musix-org/musix-oss
synced 2025-06-16 18:56:00 +00:00
Sharding
This commit is contained in:
@ -21,7 +21,7 @@ module.exports = {
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setTitle(client.messages.queueTitle)
|
||||
.setDescription(`${message}\n${queuemessage}`)
|
||||
.setFooter(`${serverQueue.songs.size - 20} ${client.messages.queueFooter}`)
|
||||
.setFooter(`${serverQueue.songs.length} ${client.messages.queueFooter}`)
|
||||
.setColor(client.config.embedColor)
|
||||
/*if (serverQueue.songs.size > 20) {
|
||||
embed.setFooter(`${serverQueue.songs.size - 20} ${client.messages.queueFooter}`)
|
||||
|
@ -1,30 +0,0 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
name: 'reload',
|
||||
alias: 'none',
|
||||
usage: '',
|
||||
description: 'Reload all files',
|
||||
onlyDev: true,
|
||||
permission: 'none',
|
||||
category: 'util',
|
||||
async execute(msg, args, client, Discord, prefix, command) {
|
||||
const commandFiles = fs.readdirSync(path.join(path.dirname(__dirname), 'commands')).filter(f => f.endsWith('.js'));
|
||||
for (const file of commandFiles) {
|
||||
const command = require(`./${file}`);
|
||||
command.uses = 0;
|
||||
client.commands.set(command.name, command);
|
||||
client.commandAliases.set(command.alias, command);
|
||||
}
|
||||
const settingFiles = fs.readdirSync(path.join(path.dirname(__dirname), 'commands/settings')).filter(f => f.endsWith('.js'));
|
||||
for (const file of settingFiles) {
|
||||
const option = require(`./settings/${file}`);
|
||||
client.settingCmd.set(option.name, option);
|
||||
}
|
||||
/*fs.readdirSync(path.join(__dirname, 'funcs')).forEach(filename => {
|
||||
this.funcs[filename.slice(0, -3)] = require(`../struct/funcs/${filename}`);
|
||||
});*/
|
||||
msg.channel.send(client.messages.reloaded);
|
||||
}
|
||||
};
|
@ -2,13 +2,11 @@ module.exports = {
|
||||
name: 'restart',
|
||||
alias: 'none',
|
||||
usage: '',
|
||||
description: 'Restart the bot',
|
||||
description: 'restart all shards',
|
||||
onlyDev: true,
|
||||
permission: 'none',
|
||||
permission: 'dev',
|
||||
category: 'util',
|
||||
async execute(msg, args, client, Discord, prefix, command) {
|
||||
client.destroy();
|
||||
require('../index.js');
|
||||
msg.channel.send(client.messages.restart);
|
||||
client.shard.respawnAll(client.config.shardDelay, client.config.respawnDelay, client.config.spawnTimeout);
|
||||
}
|
||||
};
|
||||
|
@ -16,6 +16,7 @@ module.exports = {
|
||||
.addField(client.messages.statusField1, client.ws.ping, true)
|
||||
.addField(client.messages.statusField2, latency, true)
|
||||
.addField(client.messages.statusField3, uptime, true)
|
||||
.addField(client.messages.statusField4, client.shard.ids)
|
||||
.setAuthor(client.user.username, client.user.displayAvatarURL)
|
||||
.setColor(client.config.embedColor)
|
||||
m.delete();
|
||||
|
Reference in New Issue
Block a user