remove error catch thing

This commit is contained in:
ry 2020-02-16 22:37:27 +01:00
parent 6de4923bfd
commit 654e2a23a6

View file

@ -109,34 +109,35 @@ module.exports = {
cmd.command(ctx).then(async () => { cmd.command(ctx).then(async () => {
if (!ctx.config.type.beta) ctx.client.channels.find(c => c.id === vars.logs.usage).send(`${ctx.utils.format.bold(ctx.author.tag)} (${ctx.utils.format.code(ctx.author.id)}) used ${ctx.utils.format.code(cmd.name)} in ${ctx.utils.format.bold(ctx.guild.name)} (${ctx.utils.format.code(ctx.guild.id)}) `).catch(e => console.log(e)) if (!ctx.config.type.beta) ctx.client.channels.find(c => c.id === vars.logs.usage).send(`${ctx.utils.format.bold(ctx.author.tag)} (${ctx.utils.format.code(ctx.author.id)}) used ${ctx.utils.format.code(cmd.name)} in ${ctx.utils.format.bold(ctx.guild.name)} (${ctx.utils.format.code(ctx.guild.id)}) `).catch(e => console.log(e))
await ctx.db.backend.add(`usage.${cmd.name}`, 1) await ctx.db.backend.add(`usage.${cmd.name}`, 1)
}).catch((err) => { })
if (!cmd.name === 'e926' || !cmd.name === 'e621') { /* .catch((err) => {
trello if (!cmd.name === 'e926' || !cmd.name === 'e621') {
.addCard( trello
cmd.name + ' | ' + err.message, .addCard(
`Full Error: cmd.name + ' | ' + err.message,
${err} `Full Error:
${err}
Content: ${ctx.msg.content} Content: ${ctx.msg.content}
Author: ${msg.author.tag} (${msg.author.id}) Author: ${msg.author.tag} (${msg.author.id})
Server: ${msg.guild.name} (${msg.guild.id})`, Server: ${msg.guild.name} (${msg.guild.id})`,
config.trello.boards.errors config.trello.boards.errors
) )
.then((r) => { .then((r) => {
trello trello
.addLabelToCard(r.id, config.trello.labels.errors) .addLabelToCard(r.id, config.trello.labels.errors)
.catch((error) => console.log(error)); .catch((error) => console.log(error));
}) })
.catch((err) => console.log(err)); .catch((err) => console.log(err));
} }
//console.warn(err.message); //console.warn(err.message);
let ErrorEmb = new MessageEmbed(); let ErrorEmb = new MessageEmbed();
ErrorEmb.setTitle(`${cmd.name} encountered an Error`) ErrorEmb.setTitle(`${cmd.name} encountered an Error`)
.setDescription(`\`${err.message}\`\n\n\`${err}\``) .setDescription(`\`${err.message}\`\n\n\`${err}\``)
.setColor('RED'); .setColor('RED');
return ctx.send(ErrorEmb); return ctx.send(ErrorEmb);
}); }); */
} }
} }
}; };