fix: call set_my_commands in async context via setup_global_commands
This commit is contained in:
+2
-1
@@ -154,8 +154,9 @@ async def main() -> None:
|
||||
|
||||
app = Application.builder().token(os.getenv("TELEGRAM_BOT_TOKEN")).build()
|
||||
|
||||
from bot import register_handlers # noqa: E402
|
||||
from bot import register_handlers, setup_global_commands # noqa: E402
|
||||
|
||||
await setup_global_commands(app)
|
||||
register_handlers(app)
|
||||
|
||||
scheduler = asyncio.ensure_future(scheduler_task(pool, app.bot))
|
||||
|
||||
Reference in New Issue
Block a user