mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 12:23:38 +00:00
All messages in separate file.
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user