Removing error messages are going to debug channel

This commit is contained in:
Christer Warén 2020-03-08 11:47:11 +02:00
parent b5b1387ec6
commit af44f182f6
3 changed files with 12 additions and 12 deletions

View File

@ -1,8 +1,6 @@
module.exports = { module.exports = {
name: 'ready', name: 'ready',
async execute(client, Discord) { async execute(client, Discord) {
const debugChannel = await client.channels.fetch(client.config.debug_channel);
client.debug_channel = debugChannel
if (client.config.devMode) { if (client.config.devMode) {
console.log('dev mode'); console.log('dev mode');
} }

View File

@ -1,18 +1,25 @@
{ {
"name": "radiox", "name": "radiox",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "Finnish Radio Discord Music Bot",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "start": "node ."
},
"repository": {
"type": "git",
"url": "git+https://github.com/warengroup/eximiabots-radiox.git"
},
"author": "EximiaBots",
"license": "MIT",
"bugs": {
"url": "https://github.com/warengroup/eximiabots-radiox/issues"
}, },
"author": "",
"license": "ISC",
"dependencies": { "dependencies": {
"@discordjs/opus": "^0.1.0",
"discord.js": "^12.0.1", "discord.js": "^12.0.1",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"fs": "0.0.1-security", "fs": "0.0.1-security",
"node-opus": "^0.3.3",
"path": "^0.12.7" "path": "^0.12.7"
} }
} }

View File

@ -6,11 +6,6 @@ module.exports = function (msg, args, client, Discord, prefix, command) {
command.execute(msg, args, client, Discord, prefix, command); command.execute(msg, args, client, Discord, prefix, command);
} catch (error) { } catch (error) {
msg.reply(`<:redx:674263474704220182> there was an error trying to execute that command! Please contact support with \`${prefix}bug\`!`); msg.reply(`<:redx:674263474704220182> there was an error trying to execute that command! Please contact support with \`${prefix}bug\`!`);
const embed = new Discord.MessageEmbed()
.setTitle(`Musix ${error.toString()}`)
.setDescription(error.stack.replace(/at /g, '**at **'))
.setColor('#b50002');
client.debug_channel.send(embed);
console.error(error); console.error(error);
} }
}; };