mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
catch potential error source
This commit is contained in:
parent
41ce78dbe8
commit
c39deb126d
1 changed files with 3 additions and 2 deletions
|
@ -15,11 +15,12 @@ module.exports.editOrReply = function(context, message, disableReference = false
|
||||||
// Handle responses for interaction context
|
// Handle responses for interaction context
|
||||||
if(context.editOrRespond){
|
if(context.editOrRespond){
|
||||||
return context.editOrRespond(message).catch((e)=>{
|
return context.editOrRespond(message).catch((e)=>{
|
||||||
basecamp(`<:ico_w3:1086624963047460874>\`[${process.env.HOSTNAME}]\` **\` SHARD_MESSAGE_ERROR \`** \`[Shard ${context.client.shardId}]\` Command \`${context.command.name}\` failed to respond: @ \`${Date.now()}\`\nGuild: \`${context.guild.id}\`\nChannel: \`${context.channel.id}\`\nUser: \`${context.user.id}\`\`\`\`js\n${e}\`\`\``, message)
|
basecamp(`<:ico_w3:1086624963047460874>\`[${process.env.HOSTNAME}]\` **\` SHARD_MESSAGE_ERROR \`** \`[Shard ${context.client.shardId}]\` Command \`${context.command.name}\` failed to respond: @ \`${Date.now()}\`\nGuild: \`${context.guild?.id}\`\nChannel: \`${context.channel?.id}\`\nUser: \`${context.user?.id}\`\`\`\`js\n${e}\`\`\``, message)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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).catch((e)=>
|
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 \`** \`[Shard ${context.client.shardId}]\` Command \`${context.message.content}\` failed to reply: @ \`${Date.now()}\`\nGuild: \`${context.guild.id}\`\nChannel: \`${context.channel.id}\`\nUser: \`${context.user.id}\`\`\`\`js\n${e}\`\`\``, message)
|
basecamp(`<:ico_w3:1086624963047460874>\`[${process.env.HOSTNAME}]\` **\` SHARD_MESSAGE_ERROR \`** \`[Shard ${context.client.shardId}]\` Command \`${context.message?.content}\` failed to reply: @ \`${Date.now()}\`\nGuild: \`${context.guild?.id}\`\nChannel: \`${context.channel?.id}\`\nUser: \`${context.user?.id}\`\`\`\`js\n${e}\`\`\``, message)
|
||||||
)
|
)
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue