-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommands_setup.py
More file actions
38 lines (32 loc) · 1.93 KB
/
Copy pathcommands_setup.py
File metadata and controls
38 lines (32 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Register the / command list shown in Telegram (Discoverability)."""
from __future__ import annotations
import logging
from aiogram import Bot
from aiogram.types import BotCommand
logger = logging.getLogger(__name__)
async def register_bot_commands(bot: Bot) -> None:
"""Expose core commands in the Telegram menu (⋯ or / in the input)."""
commands = [
BotCommand(command="start", description="Welcome & main menu"),
BotCommand(command="help", description="All commands"),
BotCommand(command="about", description="Version & data source"),
BotCommand(command="register", description="Link your FACEIT account"),
BotCommand(command="unlink", description="Remove FACEIT link"),
BotCommand(command="profile", description="Profile card & avatar"),
BotCommand(command="stats", description="CS2 stats dashboard"),
BotCommand(command="matches", description="Recent match history"),
BotCommand(command="match", description="Scoreboard by match ID"),
BotCommand(command="rank", description="ELO & level progress"),
BotCommand(command="compare", description="You vs one player"),
BotCommand(command="party", description="Compare 2–6 players at once"),
BotCommand(command="leaderboard", description="Registered users by ELO"),
BotCommand(command="maps", description="Map mix & per-map stats"),
BotCommand(command="trend", description="ELO history chart"),
BotCommand(command="watch", description="New-match notifications"),
BotCommand(command="card", description="Generate a shareable stats card image"),
BotCommand(command="referral", description="Your invite link & referral count"),
BotCommand(command="version", description="Running version/build"),
]
await bot.set_my_commands(commands)
names = ", ".join(c.command for c in commands)
logger.info("set_my_commands OK (%d): %s", len(commands), names)