Compare commits

..

No commits in common. "13d8f7335606254d29a0bf448d6c30b147eb920e" and "0df05e2f06523a9a9d3460699a7cff5ec0d66a50" have entirely different histories.

View file

@ -134,14 +134,12 @@ export async function queueRequest(request: apiRequest) {
if (userLimit !== false && userLimit.remaining <= 0) {
if (request instanceof DiscordApi.Message) {
request.react("🛑").catch(/*it's okay*/);
request.react("🛑");
if (!request.author.dmChannel) await request.author.createDM();
request.author.dmChannel?.send({
embeds: [{
color: 0xff0000,
description:
"You've used up your message limit for today,\n" +
`${userLimit.limit} requests in last 24 hours`,
description: `You've used up your message limit for today, ${userLimit.limit} requests in last 24 hours`,
}]
});
}
@ -266,7 +264,7 @@ async function executeFromQueue(channel: string) {
response.then(rval => Moderation.checkMessage(rval));
}
else {
if (message instanceof DiscordApi.Message) message.react("😶").catch(/*it's okay*/);
if (message instanceof DiscordApi.Message) message.react("😶");
}
} catch (e) {
console.error(`Error ocurred while handling chat completion request (${(e as object).constructor.name}):`);