Fix issues

This commit is contained in:
root
2025-10-12 10:47:58 +02:00
commit ddb5412b91
35 changed files with 2370 additions and 0 deletions

14
dist/commands/resetmemory.js vendored Normal file
View File

@@ -0,0 +1,14 @@
import { SlashCommandBuilder } from 'discord.js';
import { withConn } from '../db/pool.js';
export const data = new SlashCommandBuilder()
.setName('resetmemory')
.setDescription('Reset your AI chat memory (only affects you)');
export async function execute(interaction) {
if (!interaction.guildId)
return interaction.reply({ content: 'Guild only command.', ephemeral: true });
const target = interaction.user;
await withConn(async (conn) => {
await conn.query('DELETE FROM user_ai_memory WHERE guild_id = ? AND user_id = ?', [interaction.guildId, target.id]);
});
await interaction.reply({ content: 'Your AI memory has been fully reset.', ephemeral: true });
}