1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-16 18:56:00 +00:00
This commit is contained in:
MatteZ02
2020-03-13 22:31:04 +02:00
parent 34a5d26829
commit d8ec0be2c9
12 changed files with 35 additions and 49 deletions

View File

@ -38,6 +38,9 @@ module.exports = class extends Client {
const option = require(`../commands/settings/${file}`);
this.settingCmd.set(option.name, option);
}
if (this.config.devMode) {
this.config.token = this.config.devToken;
}
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
@ -53,10 +56,6 @@ module.exports = class extends Client {
this.db.FieldValue = require('firebase-admin').firestore.FieldValue;
if (this.config.devMode) {
this.config.token = this.config.devToken;
}
this.on('ready', () => {
require(`${events}ready`).execute(this, Discord);
});
@ -70,7 +69,7 @@ module.exports = class extends Client {
require(`${events}voiceStateUpdate`).execute(this, oldState, newState);
});
this.on('error', (error) => {
client.channels.fetch(client.config.debug_channel).send('Error: ' + error);
client.channels.fetch(client.config.debug_channel).send(`Error: ${error} on shard: ${this.shard}`);
});
this.login(this.config.token).catch(err => console.log('Failed to login: ' + err));

View File

@ -11,13 +11,16 @@ module.exports = {
primary_test_channel: "617633098296721409",
secondary_test_channel: "570531724002328577",
devId: "360363051792203779",
//misc
embedColor: "#b50002",
invite: "https://discordapp.com/api/oauth2/authorize?client_id=607266889537945605&permissions=3427328&redirect_uri=https%3A%2F%2Fdiscordapp.com%2Foauth2%2Fauthorize%3Fclient_id%3D607266889537945605%26%3Bscope%3Dbot%26%3Bpermissions%3D0&scope=bot",
//Settings
devMode: false,
devMode: true,
dblApi: false,
saveDB: true,
shards: 8,
shardDelay: 5000,
spawnTimeout: 30000,
respawnDelay: 1000,
//db values
prefix: ">",
devPrefix: "-",

View File

@ -91,7 +91,7 @@ module.exports = {
reloaded: "All files reloaded!",
removed: "🗑 removed `%SONG%` from the queue!",
reset: "<:green_check_mark:674265384777416705> Reset __all__ guild settings!",
restart: "restarted!",
restart: "restarting all shards...",
resumed: "<:resume:674685585478254603> Resumed the music!",
seekingPointPositive: "<:redx:674263474704220182> The seeking point needs to be a positive number!",
seekMax: "<:redx:674263474704220182> The lenght of this song is %LENGTH% seconds! You can't seek further than that!",
@ -118,6 +118,7 @@ module.exports = {
statusField1: ":signal_strength: Ping",
statusField2: "Latency",
statusField3: ":stopwatch: Uptime",
statusField4: "Shard: ",
statusTitle: "Status for Musix",
stop: "<:stop:674685626108477519> Stopped the music!",
validNumber: "<:redx:674263474704220182> I'm sorry, But you need to enter a valid __number__.",

View File

@ -11,7 +11,7 @@ module.exports = function (msg, args, client, Discord, prefix, command) {
const embed = new Discord.MessageEmbed()
.setTitle(`Musix ${error.toString()}`)
.setDescription(error.stack.replace(/at /g, '**at **'))
.setFooter(`guild: ${msg.guild.id}, user: ${msg.member.id}, channel: ${msg.channel.id}, date: ${date}`)
.setFooter(`guild: ${msg.guild.id} (${msg.guild.name}), user: ${msg.member.id} (${msg.member.displayName}), channel: ${msg.channel.id} (${msg.channel.name}), date: ${date}, Shard: ${client.shard.ids}`)
.setColor('#b50002');
client.debug_channel.send(embed);
console.error(error);