Compare commits
No commits in common. "1b402c791ce8f4963f10cb8d8ac6919893ca6b22" and "6f5f4251663152990d966c58755bbf97f6525dca" have entirely different histories.
1b402c791c
...
6f5f425166
2 changed files with 2 additions and 19 deletions
|
@ -56,23 +56,7 @@ export default class Ask extends Command implements Command {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const userLimit = await config.quota.checkUser(interaction.user, interaction);
|
|
||||||
|
|
||||||
if (userLimit.used >= userLimit.quota) {
|
|
||||||
interaction.reply({
|
|
||||||
|
|
||||||
embeds: [{
|
|
||||||
color: 0xff0000,
|
|
||||||
description: "You've used up your quota,\n" + userLimit.toString(),
|
|
||||||
}],
|
|
||||||
ephemeral: true,
|
|
||||||
}).catch(e => {
|
|
||||||
console.error("Failed to reply to user: ", e);
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: check content in moderation API
|
// TODO: check content in moderation API
|
||||||
|
|
||||||
const messages: ChatCompletionMessageParam[] = [
|
const messages: ChatCompletionMessageParam[] = [
|
||||||
|
|
|
@ -191,8 +191,7 @@ function logUsedTokens(
|
||||||
// it doesn't make sense to store usage in database if we don't know where it came from
|
// it doesn't make sense to store usage in database if we don't know where it came from
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const channelName: string = !message.channelId ? "[No channel]"
|
const channelName: string = !message.channel ? "[No channel]"
|
||||||
: !message.channel ? `[Unknown channel: ${message.channelId}]`
|
|
||||||
: !message.channel.isDMBased() ? `#${message.channel.name} (${message.guild?.name})`
|
: !message.channel.isDMBased() ? `#${message.channel.name} (${message.guild?.name})`
|
||||||
: `#@${getAuthor(message).tag}`
|
: `#@${getAuthor(message).tag}`
|
||||||
;
|
;
|
||||||
|
|
Loading…
Add table
Reference in a new issue