Telegram Panel
The Telegram experience is built on aiogram v3 with a stateful UI manager and inline keyboards. It aims to be usable by non‑engineers while still exposing advanced controls for power users.
Main Flows
Dashboard — status overview: active chain, wallets, last actions, quick actions.
Wallets — add existing address, create up to N per chain, set active per chain, display on dashboard.
Copy‑Trade / Sniper — start/stop modules, set parameters (slippage, gas caps), view recent executions.
Settings — language, notifications, safety toggles.
Handler Matrix (excerpt)
/start
/ open dashboard
panel/ui_handlers.py :: on_start
Open wallet menu
panel/ui_handlers.py :: _build_wallet_menu
Select active wallet
panel/ui_handlers.py :: on_wallet_select
Create wallet (ETH/Base)
panel/ui_handlers.py :: on_wallet_create
Render dashboard
panel/ui_render.py :: render_panel
UI State
ui_state.py
provides a compact state machine that tracks chat‑level context (e.g., which sub‑panel is open, pending input mode).
Best Practices
Always check bot admin rights in the target group/channel before attempting actions.
Validate addresses with strict regex (
^0x[a-fA-F0-9]{40}$
).Keep messages short and leverage inline keyboards instead of freeform commands.