diff --git a/src/commands/ask.ts b/src/commands/ask.ts index d5a1d30..ea39da7 100644 --- a/src/commands/ask.ts +++ b/src/commands/ask.ts @@ -56,23 +56,7 @@ export default class Ask extends Command implements Command { }); 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 const messages: ChatCompletionMessageParam[] = [ diff --git a/src/execution.ts b/src/execution.ts index 8c550af..579a435 100644 --- a/src/execution.ts +++ b/src/execution.ts @@ -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 return; } - const channelName: string = !message.channelId ? "[No channel]" - : !message.channel ? `[Unknown channel: ${message.channelId}]` + const channelName: string = !message.channel ? "[No channel]" : !message.channel.isDMBased() ? `#${message.channel.name} (${message.guild?.name})` : `#@${getAuthor(message).tag}` ;