Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command filter now can be sets with BotCommand object #935

Merged

Conversation

bomzheg
Copy link

@bomzheg bomzheg commented Jun 24, 2022

Description

it will be usefull for bots using SetMyCommands api call.
Example:

ABOUT_CMD = BotCommand("about", "few info about bot, its creater etc")
...
@dp.message_handler(commands=ABOUT_CMD)
async def about_cmd_handler(m: Message):
    ...

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Operating System: Windows 10
  • Python version: 3.8.9

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes.
    Few tests are not pass. Probably problem is in windows ( https://t.me/aiogram_ru/1176021 )

@evgfilim1 evgfilim1 added enhancement Make it better! new feature Missing feature 2.x Issue or PR for stable 2.x version labels Jun 25, 2022
Copy link
Contributor

@evgfilim1 evgfilim1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See @Lamroy95's comment

@bomzheg bomzheg requested a review from evgfilim1 June 28, 2022 13:53
@evgfilim1
Copy link
Contributor

@bomzheg have you tested this directly? Can you provide a code which you run to test?

@evgfilim1 evgfilim1 added the waiting for reply Further information is requested label Jul 2, 2022
aiogram/dispatcher/filters/builtin.py Outdated Show resolved Hide resolved
aiogram/dispatcher/filters/builtin.py Outdated Show resolved Hide resolved
@bomzheg bomzheg force-pushed the dev-2.x-command-filter-with-commands branch from 8bff951 to 2dffa0e Compare July 8, 2022 12:24
aiogram/dispatcher/filters/builtin.py Outdated Show resolved Hide resolved
aiogram/dispatcher/filters/builtin.py Show resolved Hide resolved
@bomzheg bomzheg force-pushed the dev-2.x-command-filter-with-commands branch from fe3d237 to 9b83aa3 Compare July 12, 2022 11:07
aiogram/dispatcher/filters/builtin.py Outdated Show resolved Hide resolved
tests/test_dispatcher/test_filters/test_builtin.py Outdated Show resolved Hide resolved
Copy link
Contributor

@evgfilim1 evgfilim1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your effort.

@JrooTJunior JrooTJunior merged commit 65475ca into aiogram:dev-2.x Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issue or PR for stable 2.x version enhancement Make it better! new feature Missing feature waiting for reply Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants