1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-16 18:56:00 +00:00

Debug channel conflict resolved

This commit is contained in:
MatteZ02
2020-04-06 00:20:34 +03:00
parent a06f616a98
commit a47ffd1012
16 changed files with 314 additions and 560 deletions

View File

@ -9,7 +9,10 @@ module.exports = {
if (msg.mentions.users.first()) {
if (msg.mentions.users.first().id === client.user.id) {
if (!args[1]) return;
if (args[1] === 'prefix') return msg.channel.send(`${client.messages.prefixHere}\`${prefix}\`.`);
if (args[1] === 'prefix') {
if (!args[2]) return msg.channel.send(`${client.messages.prefixHere}\`${prefix}\`.`);
if (args[2] === "=" && args[3]) return prefix = args[3];
}
if (args[1] === 'help') {
const command = client.commands.get("help");
return client.funcs.exe(msg, args, client, Discord, prefix, command);

View File

@ -3,14 +3,11 @@ const DBL = require("dblapi.js");
module.exports = {
name: 'ready',
async execute(client, Discord) {
const debugChannel = await client.channels.fetch(client.config.debug_channel);
client.debug_channel = debugChannel
const remoteMusixGuildsData = await client.funcs.dbget('guilds', null, client);
remoteMusixGuildsData.forEach(guildData => {
client.global.db.guilds[guildData.id] = guildData.d;
});
if (client.config.devMode) {
console.log('dev mode');
client.guilds.cache.forEach(guild => {
client.global.db.guilds[guild.id] = {
prefix: client.config.prefix,

View File

@ -6,7 +6,7 @@ module.exports = async function (client, error, guild) {
queue.connection.dispatcher.end();
return queue.textChannel.send(client.messages.songBlockedWMG);
}*/
client.debug_channel.send(client.messages.dispatcherError + error);
client.users.cache.get(client.config.devId).send(client.messages.dispatcherError + error);
queue.voiceChannel.leave();
client.queue.delete(guild.id);
return queue.textChannel.send(client.messages.errorDispatcher);