From d01d147a45eb7e98bf966b04aee344a2c4ceedc8 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Sat, 4 Apr 2026 23:11:41 +0000 Subject: [PATCH] refactor: reorganize help command with admin/non-admin split Non-admin sees minimal commands: bounty, track, untrack, my, show, start, help Admin sees organized by category: Bounty Management, Tracking, Room Management --- apps/telegram-bot/commands.py | 55 ++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/apps/telegram-bot/commands.py b/apps/telegram-bot/commands.py index 6a4360f..79bf96c 100644 --- a/apps/telegram-bot/commands.py +++ b/apps/telegram-bot/commands.py @@ -699,30 +699,39 @@ async def cmd_help(update: Update, ctx: ContextTypes.DEFAULT_TYPE) -> None: room_id = get_room_id(update) is_admin = BOUNTY_SERVICE.is_admin(room_id, user_id) - lines = [ - "👻 JIGAIDO Commands:\n", - "/bounty — list bounties", - "/my — your tracked bounties", - "/add — add bounty", - "/edit — edit bounty", - "/delete — delete bounty", - "/track — track bounty", - "/untrack — stop tracking", - "/show — show bounty details", - "/admin — manage admins", - "/timezone — get/set timezone", - ] - if is_admin: - lines.extend( - [ - "/recover — recover deleted bounties", - "/start — re-initialize", - ] - ) + lines = [ + "👻 JIGAIDO Commands (Admin):\n", + "📋 Bounty Management:", + "/bounty — list bounties", + "/add — add bounty", + "/edit — edit bounty", + "/delete — delete bounty", + "/recover — recover deleted bounties", + "", + "🔗 Tracking:", + "/track — track bounty", + "/untrack — stop tracking", + "/my — your tracked bounties", + "/show — show bounty details", + "", + "⚙️ Room Management:", + "/admin — manage admins", + "/timezone — get/set timezone", + "", + "/start — re-initialize", + "/help — show this message", + ] else: - lines.append("/start — re-initialize") - - lines.append("/help — show this message") + lines = [ + "👻 JIGAIDO Commands:\n", + "/bounty — list bounties", + "/track — track bounty", + "/untrack — stop tracking", + "/my — your tracked bounties", + "/show — show bounty details", + "/start — re-initialize", + "/help — show this message", + ] await update.message.reply_text("\n".join(lines), disable_web_page_preview=True)