mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
error logging part 3
This commit is contained in:
parent
5b84b9a70a
commit
09d1cf74c3
1 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
const { Permissions } = require("detritus-client/lib/constants")
|
const { Permissions } = require("detritus-client/lib/constants")
|
||||||
|
const { basecamp } = require("../logging")
|
||||||
|
|
||||||
module.exports.editOrReply = function(context, message, disableReference = false){
|
module.exports.editOrReply = function(context, message, disableReference = false){
|
||||||
// Apply message_reference
|
// Apply message_reference
|
||||||
|
@ -7,5 +8,7 @@ module.exports.editOrReply = function(context, message, disableReference = false
|
||||||
// Disable mentions
|
// Disable mentions
|
||||||
if(!message.allowedMentions) message.allowedMentions = {parse: [], repliedUser: false}
|
if(!message.allowedMentions) message.allowedMentions = {parse: [], repliedUser: false}
|
||||||
// Only respond if the command is still available and we have permissions to respond.
|
// Only respond if the command is still available and we have permissions to respond.
|
||||||
if(!context.message.deleted && context.channel.can(Permissions.SEND_MESSAGES)) return context.editOrReply(message)
|
if(!context.message.deleted && context.channel.can(Permissions.SEND_MESSAGES)) return context.editOrReply(message).catch((e)=>
|
||||||
|
basecamp(`<:ico_w3:1086624963047460874>\`[${process.env.HOSTNAME}]\` **\` SHARD_MESSAGE_ERROR \`** \`[${context.client.shardId}\` Command \`${context.command.name}\` failed to reply: @ \`${Date.now()}\`\n\`\`\`js\n${e}\`\`\``)
|
||||||
|
)
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue