Skip to content

feat: Add command to keyboard#22

Merged
antonykamp merged 2 commits intomasterfrom
antonykamp/command
Mar 20, 2026
Merged

feat: Add command to keyboard#22
antonykamp merged 2 commits intomasterfrom
antonykamp/command

Conversation

@antonykamp
Copy link
Copy Markdown
Owner

Summary

This pull request adds a new feature to improve the user experience in the Telegram bot by making bot commands visible in the Telegram command menu. The main change is the introduction of a post_init function that sets up these commands when the bot starts.

Enhancements to Telegram bot command visibility:

  • Added a post_init function that uses BotCommand to define and set bot commands (help, create, attempt, rename, remove) in the Telegram command menu, making them easily discoverable for users.
  • Modified the bot initialization to call post_init during application setup by passing it to ApplicationBuilder.post_init, ensuring commands are set when the bot starts.
  • Imported BotCommand from the telegram library to support command menu configuration.

Test plan

  • Existing tests pass (uv run pytest tests/)

@antonykamp antonykamp self-assigned this Mar 20, 2026
@antonykamp antonykamp merged commit 9a53b83 into master Mar 20, 2026
7 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@45d15c3). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
quizbot/bot/bot.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master      #22   +/-   ##
=========================================
  Coverage          ?   85.73%           
=========================================
  Files             ?       10           
  Lines             ?      631           
  Branches          ?        0           
=========================================
  Hits              ?      541           
  Misses            ?       90           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant