diff options
| author | huker667 <huker@tuta.io> | 2026-08-07 23:03:12 +0300 |
|---|---|---|
| committer | huker667 <huker@tuta.io> | 2026-08-07 23:03:12 +0300 |
| commit | 891131b88e2b1684a453a0b9ab9291b97331809e (patch) | |
| tree | 240e23daaa5f17c85e8173cf8fe4f29b6074dca7 /commands.py | |
| parent | ca0f5bf3deed8bbc82a79834a9419233b559ce14 (diff) | |
| download | uzbekgpt-891131b88e2b1684a453a0b9ab9291b97331809e.tar.gz uzbekgpt-891131b88e2b1684a453a0b9ab9291b97331809e.tar.bz2 uzbekgpt-891131b88e2b1684a453a0b9ab9291b97331809e.zip | |
фикс я хуй знает много чего я добавил
Diffstat (limited to 'commands.py')
| -rw-r--r-- | commands.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/commands.py b/commands.py index 32bac3c..4811b4a 100644 --- a/commands.py +++ b/commands.py @@ -27,6 +27,8 @@ from collections import Counter from colors import * from config import * from statistics import * +from vars import * +from helpers import * from supergenerator import * router = Router() @@ -69,7 +71,7 @@ async def stats_handler(message: Message): top_models = models.most_common(5) top_streams = streams.most_common(2) - top_prompts = prompts.most_common(5) + top_prompts = prompts.most_common(10) text = [ "✅ *общая статистика*", @@ -85,8 +87,8 @@ async def stats_handler(message: Message): *(f"- `{s}`: {c}" for s, c in top_streams), "👀топ режимов вызова:", *(f"- `{c}`: {n}" for c, n in calls.most_common()), - "📝топ 5 промптов:", - *(f"- `{c}`: {n}" for c, n in prompts.most_common()), + "📝топ 10 промптов:", + *(f"- `{c}`: {n}" for c, n in top_prompts.most_common()), ] await message.reply("\n".join(text)) @@ -389,7 +391,7 @@ async def prompt_handler(message: Message): config = get_user_config(user_id) system_prompt_name = config["prompt"] if system_prompt_name in SYSTEM_PROMPTS: - system_prompt = SYSTEM_PROMPTS[system_prompt_name] + system_prompt = SYSTEM_PROMPTS[system_prompt_name]["text"] else: await message.reply( f"🤝 произошла ошибка при отображении промпта `{system_prompt_name}`\n*для фото*: ```prompt\n{IMAGE_PROMPT}```изменить системный промпт узбекгпт пока что нельзя." @@ -480,21 +482,21 @@ async def settings_handler(event: Union[Message, CallbackQuery]): [ InlineKeyboardButton( text=f"стрим: {stream_status}", - callback_data=f"set_stream%{user_id}%{stream_cb}", + callback_data=f"set%stream%{user_id}%{stream_cb}", ), InlineKeyboardButton( text=f"отклик: {call_status}", - callback_data=f"set_call%{user_id}%{call_cb}", + callback_data=f"set%call%{user_id}%{call_cb}", ) ], [ InlineKeyboardButton( text=f"рассылка: {notify_status}", - callback_data=f"set_notify%{user_id}%{notify_cb}", + callback_data=f"set%notify%{user_id}%{notify_cb}", ), InlineKeyboardButton( text=f"маркдаун: {markdown_status}", - callback_data=f"set_markdown%{user_id}%{markdown_cb}", + callback_data=f"set%markdown%{user_id}%{markdown_cb}", ), ], |