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

Add protect_content global default #917

Merged

Conversation

bomzheg
Copy link

@bomzheg bomzheg commented Jun 2, 2022

Description

add global default parameter protect_content for Bot.
Usage. For make all messages by bot protected by default add new keyword arg to Bot constructor:

    bot = Bot(..., protect_content=True, ...)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

I have been using this feaеure in production bot since January 2022, no problems found.

Test Configuration:

  • Operating System: Windows 10
  • Python version: 3.8

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

@evgfilim1 evgfilim1 added new feature Missing feature 2.x Issue or PR for legacy 2.x version labels Jun 3, 2022
@JrooTJunior JrooTJunior merged commit a852b95 into aiogram:dev-2.x Aug 13, 2022
@bomzheg bomzheg deleted the dev-2.x-default-protected-content branch August 14, 2022 20:06
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 legacy 2.x version new feature Missing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants