import { sendInteractionResponse, SlashCommandOptions } from "@wackford/mod.ts"; import { AIs, checkAI } from "../ai/index.ts"; import { db } from "../database.ts"; export default { name: "reset", description: "resets the conversation history of the chatbot", execute: async (bot, interaction) => { const channelId = interaction?.channelId?.toString() as string; const AI = AIs[interaction?.channelId?.toString() as string]; if (!checkAI(bot, interaction, AI)) return; AI.reset(); db.change(channelId, { history: [], }); await sendInteractionResponse(bot, interaction, { content: `Done!`, }); }, } as SlashCommandOptions;