1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-07-07 01:20:48 +00:00

additional error logging and debugging.

This commit is contained in:
MatteZ02
2020-06-22 00:41:30 +03:00
parent 70316495f5
commit 2d7752d2cf
18 changed files with 126 additions and 87 deletions

View File

@ -68,15 +68,8 @@ module.exports = {
option.execute(msg, args, client);
} catch (error) {
msg.reply(client.messages.errorExeOpt);
const embed = new Discord.MessageEmbed()
.setTitle(`Musix ${error.toString()}`)
.setDescription(error.stack.replace(/at /g, "**at **"))
.setColor(client.config.embedColor);
client
.fetchUser(client.config.devId)
.then((user) => user.send(embed))
.catch(console.error);
client.users.cache.get(client.config.devId).send(embed);
console.log(error.toString());
console.log(error.stack.replace(/at /g, "**at **"));
}
} else {
return msg.channel.send(embed);