errors owo
This commit is contained in:
parent
0f1e61af99
commit
2956c7a9ff
3 changed files with 25 additions and 16 deletions
|
@ -59,7 +59,7 @@ module.exports = {
|
|||
}
|
||||
if (cmd.guildOnly && !msg.guild) return;
|
||||
if (cmd.nsfw && !ctx.channel.nsfw)
|
||||
return ctx.send('This channel is not marked as NSFW, please mark it as such and rerun this command.');
|
||||
return ctx.send('This channel is not set to NSFW, please mark it as such and rerun this command.');
|
||||
if (cmd.developerOnly && !client.config.developers.find((dev) => msg.author.id == dev.id)) return;
|
||||
if (cmd.AuthorPermissions !== 'NONE' && !ctx.member.permissions.has(cmd.AuthorPermissions)) {
|
||||
return ctx.send(`You need the \`${cmd.AuthorPermissions}\` Permission(s) to run this Command`);
|
||||
|
@ -88,23 +88,32 @@ module.exports = {
|
|||
setTimeout(() => timestamps.delete(msg.author.id), cooldownAmount);
|
||||
|
||||
cmd.command(ctx).then(() => {}).catch((err) => {
|
||||
trello
|
||||
.addCard(
|
||||
cmd.name + ' | ' + err.message,
|
||||
`Full Error:
|
||||
if (!cmd.name.includes('e926' || 'e621')) {
|
||||
trello
|
||||
.addCard(
|
||||
cmd.name + ' | ' + err.message,
|
||||
`Full Error:
|
||||
${err}
|
||||
|
||||
Content: ${ctx.msg.content}
|
||||
|
||||
Author: ${msg.author.tag} (${msg.author.id})
|
||||
Server: ${msg.guild.name} (${msg.guild.id})`,
|
||||
config.trello.boards.errors
|
||||
)
|
||||
.then((r) => {
|
||||
trello.addLabelToCard(r.id, config.trello.labels.errors).catch((error) => console.log(error));
|
||||
})
|
||||
.catch((err) => console.log(err));
|
||||
console.warn(err.message);
|
||||
config.trello.boards.errors
|
||||
)
|
||||
.then((r) => {
|
||||
trello
|
||||
.addLabelToCard(r.id, config.trello.labels.errors)
|
||||
.catch((error) => console.log(error));
|
||||
})
|
||||
.catch((err) => console.log(err));
|
||||
}
|
||||
//console.warn(err.message);
|
||||
let ErrorEmb = new MessageEmbed();
|
||||
ErrorEmb.setTitle(`${cmd.name} encountered an Error`)
|
||||
.setDescription(`\`${err.message}\`\n\n\`${err}\``)
|
||||
.setColor('RED');
|
||||
return ctx.send(ErrorEmb);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue