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 }); }