From 45e41937f79aaceb7e0be8f91a0b4f617fe07eb8 Mon Sep 17 00:00:00 2001 From: Markov Andrey Date: Tue, 30 Jun 2026 21:50:31 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20re?= =?UTF-8?q?set.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bots/commands/reset.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 bots/commands/reset.py diff --git a/bots/commands/reset.py b/bots/commands/reset.py deleted file mode 100644 index 7d7a5c4..0000000 --- a/bots/commands/reset.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Команда !reset – сброс истории диалога (личной или комнатной). -Использует RAGClient. -""" - -import logging -from core.commands.base import Command - -logger = logging.getLogger(__name__) - - -class ResetCommand(Command): - name = "!reset" - aliases = ["/reset"] - - async def execute(self, msg, args: str, user_jid: str, room_jid: str = None): - try: - result = await self.bot.rag_client.reset_history(user_jid, room_jid) - if result.get('status') == 'ok': - reply = msg.reply("🧹 История сброшена.") - else: - reply = msg.reply(f"❌ Ошибка сброса: {result}") - except Exception as e: - logger.exception(f"Ошибка в !reset: {e}") - reply = msg.reply(f"❌ Ошибка: {e}") - if reply: - reply.send() - - def get_help(self) -> str: - return "Сбрасывает историю диалога (личную или комнатную)." \ No newline at end of file