Compare commits
No commits in common. "f9097ae68dc14ccca7225499d7771231c8da4395" and "6673d3c29472affc72e1a5cf11e4372632652eec" have entirely different histories.
f9097ae68d
...
6673d3c294
1 changed files with 2 additions and 9 deletions
|
@ -121,7 +121,7 @@ function requestReply(
|
|||
* @returns if the request can be replied to
|
||||
*/
|
||||
function canReplyToRequest(request: apiRequest) {
|
||||
return (request.guild?.members.me?.permissionsIn(request.channel as GuildTextBasedChannel).has("SendMessages") ?? true);
|
||||
return !(request.guild?.members.me?.permissionsIn(request.channel as GuildTextBasedChannel).has("SendMessages") ?? true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -286,19 +286,12 @@ async function executeFromQueue(channel: string) {
|
|||
console.error(`Error ocurred while handling chat completion request (${(e as object).constructor.name}):`);
|
||||
console.error(e);
|
||||
|
||||
let errorText = "\n";
|
||||
|
||||
if (e instanceof Error) {
|
||||
errorText += e.message;
|
||||
}
|
||||
else errorText = "";
|
||||
|
||||
requestReply(
|
||||
message,
|
||||
{
|
||||
embeds: [{
|
||||
color: 0xff0000,
|
||||
description: "Something bad happened! :frowning:" + errorText
|
||||
description: "Something bad happened! :frowning:"
|
||||
}],
|
||||
},
|
||||
{allowedMentions: { repliedUser: false } },
|
||||
|
|
Loading…
Reference in a new issue