Log more more information on error (origin, type)
also fix the emoji in embed sent in reply
This commit is contained in:
parent
dffb13361c
commit
960c340760
2 changed files with 4 additions and 2 deletions
|
@ -61,12 +61,13 @@ discord.on("messageCreate", async message => {
|
||||||
message.react("😶");
|
message.react("😶");
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.error(`Error ocurred while handling chat completion request (${(e as object).constructor.name}):`);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
||||||
message.reply({
|
message.reply({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
color: 0xff0000,
|
color: 0xff0000,
|
||||||
description: "Something bad happened! :frown:"
|
description: "Something bad happened! :frowning:"
|
||||||
}],
|
}],
|
||||||
allowedMentions: {
|
allowedMentions: {
|
||||||
repliedUser: false,
|
repliedUser: false,
|
||||||
|
|
|
@ -30,7 +30,8 @@ export default class Moderation {
|
||||||
return flagged;
|
return flagged;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
console.log(e);
|
console.error(`Error occured while handling moderation request (${(e as object).constructor.name}):`);
|
||||||
|
console.error(e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue