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
This commit is contained in:
@@ -699,30 +699,39 @@ async def cmd_help(update: Update, ctx: ContextTypes.DEFAULT_TYPE) -> None:
|
|||||||
room_id = get_room_id(update)
|
room_id = get_room_id(update)
|
||||||
is_admin = BOUNTY_SERVICE.is_admin(room_id, user_id)
|
is_admin = BOUNTY_SERVICE.is_admin(room_id, user_id)
|
||||||
|
|
||||||
|
if is_admin:
|
||||||
lines = [
|
lines = [
|
||||||
"👻 JIGAIDO Commands:\n",
|
"👻 JIGAIDO Commands (Admin):\n",
|
||||||
|
"📋 Bounty Management:",
|
||||||
"/bounty — list bounties",
|
"/bounty — list bounties",
|
||||||
"/my — your tracked bounties",
|
|
||||||
"/add — add bounty",
|
"/add — add bounty",
|
||||||
"/edit — edit bounty",
|
"/edit — edit bounty",
|
||||||
"/delete — delete bounty",
|
"/delete — delete bounty",
|
||||||
|
"/recover — recover deleted bounties",
|
||||||
|
"",
|
||||||
|
"🔗 Tracking:",
|
||||||
"/track — track bounty",
|
"/track — track bounty",
|
||||||
"/untrack — stop tracking",
|
"/untrack — stop tracking",
|
||||||
|
"/my — your tracked bounties",
|
||||||
"/show — show bounty details",
|
"/show — show bounty details",
|
||||||
|
"",
|
||||||
|
"⚙️ Room Management:",
|
||||||
"/admin — manage admins",
|
"/admin — manage admins",
|
||||||
"/timezone — get/set timezone",
|
"/timezone — get/set timezone",
|
||||||
]
|
"",
|
||||||
|
|
||||||
if is_admin:
|
|
||||||
lines.extend(
|
|
||||||
[
|
|
||||||
"/recover — recover deleted bounties",
|
|
||||||
"/start — re-initialize",
|
"/start — re-initialize",
|
||||||
|
"/help — show this message",
|
||||||
]
|
]
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
lines.append("/start — re-initialize")
|
lines = [
|
||||||
|
"👻 JIGAIDO Commands:\n",
|
||||||
lines.append("/help — show this message")
|
"/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)
|
await update.message.reply_text("\n".join(lines), disable_web_page_preview=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user