feat: implement /recover command for listing and recovering soft-deleted bounties
- Add recover_bounty method to BountyService (admin-only) - Add cmd_recover handler for listing and recovering deleted bounties - Register /recover command in bot.py - Add /recover to bot command list /recover - list all recoverable bounties (sorted by deleted_at desc) /recover <id...> - recover specific bounty(ies) Output formats: List: [#1] Deleted bounty | 🗑️ Deleted 2 Apr 2026 Recover: ✅ Recovered bounty #1. or ⛔ Bounty #5 not found or not deleted. Fixes #49
This commit is contained in:
@@ -14,6 +14,7 @@ from commands import (
|
||||
cmd_edit,
|
||||
cmd_help,
|
||||
cmd_my,
|
||||
cmd_recover,
|
||||
cmd_show,
|
||||
cmd_start,
|
||||
cmd_timezone,
|
||||
@@ -47,6 +48,7 @@ def build_app() -> Application:
|
||||
app.add_handler(CommandHandler("show", cmd_show))
|
||||
app.add_handler(CommandHandler("timezone", cmd_timezone))
|
||||
app.add_handler(CommandHandler("admin", cmd_admin))
|
||||
app.add_handler(CommandHandler("recover", cmd_recover))
|
||||
|
||||
app.add_handler(MessageHandler(filters.COMMAND, cmd_help))
|
||||
|
||||
@@ -65,6 +67,7 @@ async def post_init(app: Application) -> None:
|
||||
("show", "Show bounty details"),
|
||||
("timezone", "Get/set room timezone"),
|
||||
("admin", "Manage admins"),
|
||||
("recover", "Recover deleted bounties"),
|
||||
("help", "Show help"),
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user