feat: add category command handlers
Commands layer for category feature (Issue #87): New Commands: - /category - list all categories - /category add <slug> <name> - create category (admin) - /category delete <slug> - soft delete category (admin) Updated Commands: - /add - supports -cat <slug>[,<slug>] flag - /update - supports -cat, -cat -, and -remove-cat flags - /bounty - supports -c <slug>[,<slug>] filter - /show - displays categories for bounty - /help - includes category commands Syntax Examples: - /add Fix bug github.com/repo -cat bug,urgent - /update 1 -cat feature,docs - /update 1 -cat - (clear categories) - /update 1 -remove-cat bug - /bounty -c bug - /bounty -c bug,feature
This commit is contained in:
@@ -15,6 +15,7 @@ from commands import (
|
||||
cmd_add,
|
||||
cmd_admin,
|
||||
cmd_bounty,
|
||||
cmd_category,
|
||||
cmd_delete,
|
||||
cmd_delete_message,
|
||||
cmd_edit,
|
||||
@@ -61,6 +62,7 @@ def build_app() -> Application:
|
||||
app.add_handler(CommandHandler("timezone", cmd_timezone))
|
||||
app.add_handler(CommandHandler("admin", cmd_admin))
|
||||
app.add_handler(CommandHandler("recover", cmd_recover))
|
||||
app.add_handler(CommandHandler("category", cmd_category))
|
||||
|
||||
app.add_handler(CallbackQueryHandler(cmd_delete_message))
|
||||
|
||||
@@ -82,6 +84,7 @@ async def post_init(app: Application) -> None:
|
||||
("timezone", "Get/set room timezone"),
|
||||
("admin", "Manage admins"),
|
||||
("recover", "Recover deleted bounties"),
|
||||
("category", "Manage categories"),
|
||||
("help", "Show help"),
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user