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.guildOnly && !msg.guild) return;
|
||||||
if (cmd.nsfw && !ctx.channel.nsfw)
|
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.developerOnly && !client.config.developers.find((dev) => msg.author.id == dev.id)) return;
|
||||||
if (cmd.AuthorPermissions !== 'NONE' && !ctx.member.permissions.has(cmd.AuthorPermissions)) {
|
if (cmd.AuthorPermissions !== 'NONE' && !ctx.member.permissions.has(cmd.AuthorPermissions)) {
|
||||||
return ctx.send(`You need the \`${cmd.AuthorPermissions}\` Permission(s) to run this Command`);
|
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);
|
setTimeout(() => timestamps.delete(msg.author.id), cooldownAmount);
|
||||||
|
|
||||||
cmd.command(ctx).then(() => {}).catch((err) => {
|
cmd.command(ctx).then(() => {}).catch((err) => {
|
||||||
trello
|
if (!cmd.name.includes('e926' || 'e621')) {
|
||||||
.addCard(
|
trello
|
||||||
cmd.name + ' | ' + err.message,
|
.addCard(
|
||||||
`Full Error:
|
cmd.name + ' | ' + err.message,
|
||||||
|
`Full Error:
|
||||||
${err}
|
${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.addLabelToCard(r.id, config.trello.labels.errors).catch((error) => console.log(error));
|
trello
|
||||||
})
|
.addLabelToCard(r.id, config.trello.labels.errors)
|
||||||
.catch((err) => console.log(err));
|
.catch((error) => console.log(error));
|
||||||
console.warn(err.message);
|
})
|
||||||
|
.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="
|
"integrity": "sha1-tUUOkudu82td0k42YAkeuu7z5cc="
|
||||||
},
|
},
|
||||||
"yiff": {
|
"yiff": {
|
||||||
"version": "1.2.5",
|
"version": "1.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/yiff/-/yiff-1.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/yiff/-/yiff-1.2.7.tgz",
|
||||||
"integrity": "sha512-W/sRbqLJSfnyEfj8RdMLUpYihc/fipJ/jlUS3MMTTA6SIMfocZKJJS+G1MXVFKbTfOzMVeRKEPV9g7lDL949JA==",
|
"integrity": "sha512-CmIrdthuTrFwBadp/0agyBexsonU7COzFaIFNqMmpWECSEAH1RpX8+tb0g+//W6YlH7rEHRuBjKxnJ55YXDpCg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.0",
|
||||||
"chalk": "^2.4.2"
|
"chalk": "^2.4.2"
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"shell-exec": "^1.0.2",
|
"shell-exec": "^1.0.2",
|
||||||
"trello": "^0.9.1",
|
"trello": "^0.9.1",
|
||||||
"usage": "^0.7.1",
|
"usage": "^0.7.1",
|
||||||
"yiff": "^1.2.5"
|
"yiff": "^1.2.7"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "nodemon index.js"
|
"test": "nodemon index.js"
|
||||||
|
|
Loading…
Reference in a new issue