All messages in separate file.

This commit is contained in:
Christer Warén
2020-03-13 00:53:23 +02:00
parent 695c5a1e40
commit 7f2a1755eb
14 changed files with 105 additions and 42 deletions

View File

@ -10,12 +10,12 @@ module.exports = {
const command = client.commands.get(commandName) || client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName)) || client.commandAliases.get(commandName);
if (!command && msg.content !== `${prefix}`) return;
const permissions = msg.channel.permissionsFor(msg.client.user);
if (!permissions.has('EMBED_LINKS')) return msg.channel.send('I cannot send embeds (Embed links).');
if (!permissions.has('EMBED_LINKS')) return msg.channel.send(client.messages.noPermsEmbed);
try {
command.uses++;
command.execute(msg, args, client, Discord, prefix, command);
} catch (error) {
msg.reply(`Error!`);
msg.reply(client.messages.runningCommandFailed);
console.error(error);
}
}

View File

@ -23,8 +23,7 @@ module.exports = {
radio.connection.dispatcher.destroy();
radio.voiceChannel.leave();
client.radio.delete(msg.guild.id);
client.debug_channel.send("Error with connecting to voice channel: " + error);
return msg.channel.send(`An error occured: ${error}`);
return;
}
}
if (newState.channel !== radio.voiceChannel) {