ccgram 2.2.2__tar.gz → 2.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ccgram-2.2.2 → ccgram-2.2.3}/CHANGELOG.md +9 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/PKG-INFO +1 -1
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/_version.py +2 -2
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/cc_commands.py +32 -32
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/main.py +4 -1
- {ccgram-2.2.2 → ccgram-2.2.3}/.claude/rules/architecture.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/.claude/rules/message-handling.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/.claude/rules/topic-architecture.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/.claude/skills/releasing/SKILL.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/.env.example +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/.github/workflows/ci.yml +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/.github/workflows/release.yml +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/.gitignore +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/CLAUDE.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/LICENSE +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/Makefile +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/README.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/cliff.toml +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/docs/ai-agents/README.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/docs/ai-agents/architecture-map.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/docs/ai-agents/codebase-index.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/docs/ai-agents/extension-and-fix-playbook.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/docs/ai-agents/tooling-and-tests.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/docs/guides.md +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/llm.txt +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/pyproject.toml +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/scripts/generate_homebrew_formula.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/scripts/restart.sh +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/__init__.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/bot.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/cli.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/codex_status.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/command_catalog.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/config.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/doctor_cmd.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/JetBrainsMono-Regular.ttf +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/LICENSE-JetBrainsMono.txt +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/LICENSE-NotoSansMono.txt +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/LICENSE-Symbola.txt +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/NotoSansMonoCJKsc-Regular.otf +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/fonts/Symbola.ttf +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/__init__.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/callback_data.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/callback_helpers.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/cleanup.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/command_history.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/directory_browser.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/directory_callbacks.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/file_handler.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/history.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/history_callbacks.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/hook_events.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/interactive_callbacks.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/interactive_ui.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/message_queue.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/message_sender.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/recovery_callbacks.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/response_builder.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/restore_command.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/resume_command.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/screenshot_callbacks.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/sessions_dashboard.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/status_polling.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/sync_command.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/text_handler.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/topic_emoji.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/upgrade.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/user_state.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/voice_callbacks.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/voice_handler.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/handlers/window_callbacks.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/hook.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/interactive_prompt_formatter.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/markdown_v2.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/monitor_state.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/__init__.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/_jsonl.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/base.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/claude.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/codex.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/gemini.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/providers/registry.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/screen_buffer.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/screenshot.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/session.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/session_monitor.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/state_persistence.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/status_cmd.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/telegram_request.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/telegram_sender.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/terminal_parser.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/tmux_manager.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/transcript_parser.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/utils.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/whisper/__init__.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/whisper/base.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/whisper/httpx_transcriber.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/src/ccgram/window_resolver.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/conftest.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/handlers/__init__.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/handlers/test_command_history.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/handlers/test_history.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/handlers/test_response_builder.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/handlers/test_voice_handler.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_bot_callbacks.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_callback_auth.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_cc_commands.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_claude_characterization.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_cleanup.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_cli.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_codex_status.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_command_catalog.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_commands_command.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_config.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_directory_browser.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_doctor_cmd.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_emdash_integration.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_external_discovery.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_file_handler.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_forward_command.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_group_filter.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_handle_new_window.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_hook.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_hook_events.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_interactive_prompt_formatter.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_interactive_ui.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_jsonl_providers.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_kill_command.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_markdown_v2.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_message_queue_properties.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_message_sender.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_monitor_state.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_new_command.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_new_window_sync.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_provider_autodetect.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_provider_contracts.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_provider_registry.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_provider_selection.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_recovery_ui.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_restore_command.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_resume_command.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_screen_buffer.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_session.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_session_favorites.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_session_monitor.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_session_monitor_events.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_session_notification_mode.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_sessions_dashboard.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_state_migration.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_status_buttons.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_status_cmd.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_status_polling.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_status_recall_callback.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_sync_command.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_task_utils.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_telegram_request.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_telegram_sender.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_terminal_parser.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_text_handler.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_tmux_autodetect.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_tool_batching.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_topic_edited.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_topic_emoji.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_transcript_parser.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_utils.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_vim_mode.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/test_window_callbacks.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/whisper/__init__.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/ccgram/whisper/test_transcriber.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/conftest.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/__init__.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/_helpers.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/conftest.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/test_claude_lifecycle.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/test_codex_lifecycle.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/test_gemini_lifecycle.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/e2e/test_voice_lifecycle.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/conftest.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_autodetect_integration.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_config_integration.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_hook_pipeline.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_message_dispatch.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_monitor_flow.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_monitor_state_integration.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_state_roundtrip.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_tmux_manager.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/tests/integration/test_whisper_integration.py +0 -0
- {ccgram-2.2.2 → ccgram-2.2.3}/uv.lock +0 -0
|
@@ -4,8 +4,17 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
## [2.2.3] - 2026-03-20
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- Respect Telegram cooldown period and log version at startup
|
|
11
|
+
|
|
7
12
|
## [2.2.2] - 2026-03-20
|
|
8
13
|
|
|
14
|
+
### Documentation
|
|
15
|
+
- Update CHANGELOG.md for v2.2.2
|
|
16
|
+
|
|
17
|
+
|
|
9
18
|
### Fixed
|
|
10
19
|
- Handle Telegram flood control during startup command registration
|
|
11
20
|
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '2.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (2, 2,
|
|
31
|
+
__version__ = version = '2.2.3'
|
|
32
|
+
__version_tuple__ = version_tuple = (2, 2, 3)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -290,37 +290,37 @@ async def register_commands(
|
|
|
290
290
|
|
|
291
291
|
from telegram.error import RetryAfter
|
|
292
292
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
293
|
+
max_startup_wait = 120 # Don't block startup longer than this
|
|
294
|
+
|
|
295
|
+
try:
|
|
296
|
+
if scope is None:
|
|
297
|
+
await bot.delete_my_commands()
|
|
298
|
+
await bot.set_my_commands(bot_commands)
|
|
299
|
+
else:
|
|
300
|
+
await bot.delete_my_commands(scope=scope)
|
|
301
|
+
await bot.set_my_commands(bot_commands, scope=scope)
|
|
302
|
+
except RetryAfter as e:
|
|
303
|
+
retry_secs = (
|
|
304
|
+
e.retry_after
|
|
305
|
+
if isinstance(e.retry_after, int)
|
|
306
|
+
else int(e.retry_after.total_seconds())
|
|
307
|
+
)
|
|
308
|
+
if retry_secs > max_startup_wait:
|
|
309
|
+
logger.warning(
|
|
310
|
+
"Telegram flood control: %ds cooldown, skipping command registration"
|
|
311
|
+
" (will retry in 10min refresh cycle)",
|
|
312
|
+
retry_secs,
|
|
311
313
|
)
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
)
|
|
325
|
-
return
|
|
314
|
+
return
|
|
315
|
+
logger.warning(
|
|
316
|
+
"Telegram flood control: retrying command registration in %ds",
|
|
317
|
+
retry_secs,
|
|
318
|
+
)
|
|
319
|
+
await asyncio.sleep(retry_secs)
|
|
320
|
+
if scope is None:
|
|
321
|
+
await bot.delete_my_commands()
|
|
322
|
+
await bot.set_my_commands(bot_commands)
|
|
323
|
+
else:
|
|
324
|
+
await bot.delete_my_commands(scope=scope)
|
|
325
|
+
await bot.set_my_commands(bot_commands, scope=scope)
|
|
326
326
|
logger.info("Registered %d bot commands (%d CC)", len(bot_commands), cc_count)
|
|
@@ -129,7 +129,10 @@ def run_bot() -> None:
|
|
|
129
129
|
|
|
130
130
|
logger.info("Tmux session '%s' ready", session.session_name)
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
from . import __version__
|
|
133
|
+
|
|
134
|
+
dev = "+dev" if "+unknown" in __version__ or ".dev" in __version__ else ""
|
|
135
|
+
logger.info("Starting ccgram %s%s", __version__, dev)
|
|
133
136
|
from .bot import create_bot
|
|
134
137
|
|
|
135
138
|
application = create_bot()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|