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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -3569,9 +3569,9 @@
|
|||
"integrity": "sha1-tUUOkudu82td0k42YAkeuu7z5cc="
|
||||
},
|
||||
"yiff": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/yiff/-/yiff-1.2.5.tgz",
|
||||
"integrity": "sha512-W/sRbqLJSfnyEfj8RdMLUpYihc/fipJ/jlUS3MMTTA6SIMfocZKJJS+G1MXVFKbTfOzMVeRKEPV9g7lDL949JA==",
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/yiff/-/yiff-1.2.7.tgz",
|
||||
"integrity": "sha512-CmIrdthuTrFwBadp/0agyBexsonU7COzFaIFNqMmpWECSEAH1RpX8+tb0g+//W6YlH7rEHRuBjKxnJ55YXDpCg==",
|
||||
"requires": {
|
||||
"axios": "^0.19.0",
|
||||
"chalk": "^2.4.2"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"shell-exec": "^1.0.2",
|
||||
"trello": "^0.9.1",
|
||||
"usage": "^0.7.1",
|
||||
"yiff": "^1.2.5"
|
||||
"yiff": "^1.2.7"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "nodemon index.js"
|
||||
|
|
Loading…
Reference in a new issue