Compare commits

...

545 commits

Author SHA1 Message Date
JRoot Junior
e4d3692ac2
Bump changelog
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.14) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.14) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.14) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.11) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.11) (push) Has been cancelled
2026-04-04 01:54:58 +03:00
m-xim
19a6131618
Remove redundant list() around sorted() and fix router type name in validation error message (#1788)
* Remove redundant list() around sorted()

* Fix type name in error message for router type validation

* Add changelog
2026-04-04 01:42:04 +03:00
Temrjan
0611d0d953
fix: CommandStart(deep_link=False) now rejects deep-link arguments (#1790)
Previously the deep_link parameter only had two effective states:
False (default) accepted any /start command regardless of arguments,
and True required arguments to be present.

Change the default to None (accept both, backward compatible) so that
False can mean "reject if deep-link arguments are present", which is
the intuitive expectation when explicitly passing deep_link=False.

Closes #1713

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 01:27:29 +03:00
Sergey Maranchuk
d5bd0b98a3
Fix HtmlDecoration attribute name for custom emoji method (#1782) (#1783) 2026-04-04 01:27:16 +03:00
Aleksandr Zainulgabidinov
875f37f780
Feature/eq method for default (#1789)
* Add changelog for #1707

* Add __eq__ and __hash__ methods to the Default class

* Add tests for the eq and hash methods to the TestDefault
2026-04-04 01:24:34 +03:00
Alex Root Junior
9f49c0413f
Added full support for the Bot API 9.6 (#1792)
* Added full support for the Bot API 9.6

* Add support for `managed_bot` updates

* Set `description_parse_mode` default to `"parse_mode"` and use `DateTime` for `addition_date` in `PollOption`

* Update changelog with features and changes from Bot API 9.6

* Add changelog fragment generator and update poll parameter descriptions
2026-04-04 01:22:08 +03:00
NasrollahYusefi
00c1130938
Correct release version number in CHANGES.rst (#1784)
Co-authored-by: unknown <nasrollahjusefi@gmail.com>
2026-03-07 13:34:21 +02:00
JRoot Junior
3e2ca5b6b0
Bump changelog 2026-03-03 01:26:18 +02:00
JRoot Junior
49eac319a3
Optimize imports in aiogram/types/base.py 2026-03-03 01:24:55 +02:00
Bogdan I
bd75ae361e
Fix protected namespace warning for model_custom_emoji_id (#1775)
* fix UserWarning, model_custom_emoji_id

* Add changelog for #1772
2026-03-03 01:24:05 +02:00
Alex Root Junior
f68c24d620
Added support for Telegram Bot API 9.5 (#1780)
* Update API methods and types for Telegram Bot API 9.5

* Draft: follow-up for Bot API 9.5 (#1780) (#1781)

* Add set_chat_member_tag shortcut coverage

* Add set_member_tag shortcut tests and align decoration expectations

* Fix follow-up test coverage for sender_tag and can_edit_tag

* Add changelog fragment for PR 1781

* Align changelog with base PR #1780

* Expand 1780 changelog to cover base and follow-up scope

* Treat sender_tag as metadata, not message content type

---------

Co-authored-by: Latand <latand@users.noreply.github.com>
Co-authored-by: Codex Agent <codex@openclaw.local>

* Add tests for date_time formatting with Unix time and datetime objects

* Update changelog with Telegram Bot API 9.5 changes

---------

Co-authored-by: Kostiantyn Kriuchkov <36363097+Latand@users.noreply.github.com>
Co-authored-by: Latand <latand@users.noreply.github.com>
Co-authored-by: Codex Agent <codex@openclaw.local>
2026-03-03 01:19:11 +02:00
Kostiantyn Kriuchkov
73710acb4c
Preserve middleware data across scene transitions (#1687) (#1766)
* Preserve middleware context across scene goto transitions (#1687)

* Add After.goto coverage for scene middleware context (#1687)
2026-02-15 20:24:34 +02:00
Kostiantyn Kriuchkov
e37eddbe8c
Document webhook proxy trust model (#47) (#1765) 2026-02-15 20:24:15 +02:00
Kostiantyn Kriuchkov
fa844fce59
Add icon and style args to keyboard builders (#1769) 2026-02-15 20:22:56 +02:00
Kostiantyn Kriuchkov
c73db32e86
Add AGENTS/CLAUDE contributor instructions for dev-3.x (#1767)
* Add AGENTS and CLAUDE contributor guidance

* Update AGENTS.md to include code style enforcement via Ruff

* Remove unnecessary AGENTS.md guidance
2026-02-15 20:22:15 +02:00
JRoot Junior
f9ba9e37c6
Bump changelog 2026-02-10 23:47:19 +02:00
Alex Root Junior
49d0784e33
Added full support of the Bot API 9.4 (#1761)
* Bump API schema to version 9.4, add new object types, methods, and properties.

* Add tests for `ChatOwnerChanged` and `ChatOwnerLeft` message types

* Add tests for `GetUserProfileAudios`, `RemoveMyProfilePhoto`, and `SetMyProfilePhoto` methods

* Bump version

* Update Makefile variables and refactor `test_get_user_profile_audios.py`

* Document new features and updates from Bot API 9.4 in changelog

* Add `ButtonStyle` enum to represent button styles in the Telegram API

* Fix review issues from PR #1761

- Remove stray '-' artifact from GameHighScore docstring and butcher schema
- Fix Makefile reformat target scope inconsistency (ruff check --fix)
- Fix ButtonStyle enum source URL (#chat -> #inlinekeyboardbutton)
- Add User.get_profile_audios() shortcut method (parallel to get_profile_photos)
- Test ChatOwnerLeft with new_owner=None (edge case)
- Add VideoQuality type and Video.qualities nesting tests
- Add User.get_profile_audios() test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert "Fix review issues from PR #1761"

This reverts commit 2184e98988.

* Update source links for `ButtonStyle` documentation to reflect accurate API references

* Fix review issues from PR #1761 (#1762)

* Fix review issues from PR #1761

- Remove stray '-' artifact from GameHighScore docstring
- Fix Makefile reformat target scope inconsistency (ruff check --fix)
- Add User.get_profile_audios() shortcut method (parallel to get_profile_photos)
- Test ChatOwnerLeft with new_owner=None (edge case)
- Add VideoQuality type and Video.qualities nesting tests
- Add User.get_profile_audios() test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Address review comments: use fixture and variables in tests, add changelog

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Address review follow-ups for PR #1762

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Reformat code

* Shut up, ruff

---------

Co-authored-by: latand <latand666@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Kostiantyn Kriuchkov <36363097+Latand@users.noreply.github.com>
2026-02-10 23:43:52 +02:00
Kostiantyn Kriuchkov
da7bfdca0c
Fix #1743: scene handling for channel updates (#1763)
* Fix scene handling for channel updates with missing FSM state (#1743)

* Add changelog entry for scene handling fix

* Refine scene context error handling
2026-02-10 23:08:44 +02:00
m-xim
1708980ceb
Add full_name property to Contact and corresponding tests (#1758)
* Add full_name property to Contact and corresponding tests

* Add brief description of changes
2026-02-01 21:22:15 +02:00
Oleg A.
f2459fbcf2
Update migration guide for exception handling in v3 (#1756)
* Update migration guide for exception handling in v3

* Turn back deleted blocks

* Remove redundant notes
2026-02-01 21:15:17 +02:00
Alex Root Junior
ec7da0f678
Migrate from Black to Ruff (#1750)
* Migrate from Black to Ruff and reformat code with enabling additional linter checks

* Add changelog for migration to Ruff as formatter and linter

* Add type ignores for specific attributes and replace tuple with set for chat type check

* Remove file from another changes
2026-01-04 21:34:08 +02:00
JRoot Junior
a4a3f42c71
Bump version 2026-01-02 02:55:00 +02:00
Alex Root Junior
0306695b61
Update type hints across the codebase (#1749)
* Update type hints across the codebase

* Added changelog record
2026-01-02 02:50:46 +02:00
Alex Root Junior
dcff0f99c7
Added full support of Telegram Bot API 9.3 (#1747)
* Added full support of Telegram Bot API 9.3

* Fixed tests that fails

* Add tests for `GetChatGifts`, `GetUserGifts`, `RepostStory`, and `SendMessageDraft` methods

* Added changelog record
2026-01-02 01:45:35 +02:00
Alex Root Junior
ce4ddb77f4
Migrate to UV (#1748)
* Switch to using `uv` for dependency management and update related project workflows and scripts

* Expand contributing documentation with instructions for using `uv`, including dependency management, testing, linting, and docs workflows.

* Add changelog entry for migration to `uv` for dependency management and workflows
2026-01-02 01:27:37 +02:00
Artem Kushnerov
7201e82238
Fix i18n relative path + reformat using pre-commit (#1740)
* fix: i18n relative path + reformat using `pre-commit`

* chore: changes

---------

Co-authored-by: Katant <katantdev@mail.ru>
2026-01-02 00:01:02 +02:00
Andrew
b27ca9a45d
Fix getting callback params on py3.14+ (#1741)
* Add test to reproduce `TypeError: unsupported callable` on `python >=3.14`

* Fix getting callback params on py3.14+

Add 1741.bugfix.rst

* Code optimization
2026-01-01 23:42:40 +02:00
JRoot Junior
79ee135331
Bump version
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.14) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.14) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.14) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.11) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.11) (push) Has been cancelled
2025-12-07 01:25:42 +02:00
JRoot Junior
e0c9613b87
Bump changelog 2025-12-07 00:35:43 +02:00
Andrew
b611e083a8
Temporary silent *asyncio.iscoroutinefunction.*:DeprecationWarning (#1739)
* Temporary silent `*asyncio.iscoroutinefunction.*:DeprecationWarning` until `uvloop` fix
Bump pytest to 9.*
Bump dev deps

* Add 1739.misc.rst
2025-12-07 00:33:09 +02:00
JRoot Junior
c5a403a2f1
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.14) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.14) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.14) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.11) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.11) (push) Has been cancelled
2025-12-02 20:01:50 +02:00
JRoot Junior
5cc126368b
Bump dependencies 2025-12-02 20:01:10 +02:00
Samandar Murodjonov
af899e6773
Update feed_update call to include bot parameter (#1733)
bot parameter is required in dispatcher.feed_update method but is not present in the documentation
2025-11-04 01:34:51 +02:00
Andrew
4caf56814e
Support of Py3.14 (#1730)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.14) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.14) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.14) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.11) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.11) (push) Has been cancelled
* Py3.14 support
Bump .pre-commit-config.yaml
Bump `mongo` feature deps
Bump `proxy` feature dep
Bump `test` feature deps
Bump `dev` feature deps

Set `aiohttp` max version `<3.14`

Fix `test_isolation.py` tests
Fix `test_storages.py` tests

Add Py version limit `<3.15` (breaking changes possible)
Add new `uvloop` starter to `Dispatcher.run_polling`

Remove old `uvloop` `set_event_loop_policy`
Remove `pytest-lazy-fixture`

* Make `test` and `dev` features deps strong fixed

* Add 1730.feature.rst

* Remove unneeded `None` from `Dispatcher.run_polling`

* Fix `macos-latest-pypy3.11` test `test_aiohtt_server.py`

* Update `tests.yml`

* Update `tests.yml`
2025-10-11 00:16:50 +03:00
Alex Root Junior
0c6a705310
#1719 Update pydantic to 2.12 (#1729)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.11) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.11) (push) Has been cancelled
* #1719 Update pydantic

* #1719 Added changelog
2025-10-08 00:56:15 +03:00
Andrew
df7b16d5b3
EOL of Py3.9 (#1726)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.11) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.11) (push) Has been cancelled
* Drop py3.9 and pypy3.9

Add pypy3.11 (testing) into `tests.yml`

Remove py3.9 from matrix in `tests.yml`

Refactor not auto-gen code to be compatible with py3.10+, droping ugly 3.9 annotation.

Replace some `from typing` imports to `from collections.abc`, due to deprecation

Add `from __future__ import annotations` and `if TYPE_CHECKING:` where possible

Add some `noqa` to calm down Ruff in some places, if Ruff will be used as default linting+formatting tool in future

Replace some relative imports to absolute

Sort `__all__` tuples in `__init__.py` and some other `.py` files

Sort `__slots__` tuples in classes

Split raises into `msg` and `raise` (`EM101`, `EM102`) to not duplicate error message in the traceback

Add `Self` from `typing_extenstion` where possible

Resolve typing problem in `aiogram/filters/command.py:18`

Concatenate nested `if` statements

Convert `HandlerContainer` into a dataclass in `aiogram/fsm/scene.py`

Bump tests docker-compose.yml `redis:6-alpine` -> `redis:8-alpine`

Bump tests docker-compose.yml `mongo:7.0.6` -> `mongo:8.0.14`

Bump pre-commit-config `black==24.4.2` -> `black==25.9.0`

Bump pre-commit-config `ruff==0.5.1` -> `ruff==0.13.3`

Update Makefile lint for ruff to show fixes

Add `make outdated` into Makefile

Use `pathlib` instead of `os.path`

Bump `redis[hiredis]>=5.0.1,<5.3.0` -> `redis[hiredis]>=6.2.0,<7`

Bump `cryptography>=43.0.0` -> `cryptography>=46.0.0` due to security reasons

Bump `pytz~=2023.3` -> `pytz~=2025.2`

Bump `pycryptodomex~=3.19.0` -> `pycryptodomex~=3.23.0` due to security reasons

Bump linting and formatting tools

* Add `1726.removal.rst`

* Update aiogram/utils/dataclass.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aiogram/filters/callback_data.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update 1726.removal.rst

* Remove `outdated` from Makefile

* Add `__slots__` to `HandlerContainer`

* Remove unused imports

* Add `@dataclass` with `slots=True` to `HandlerContainer`

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-06 19:19:23 +03:00
JRoot Junior
ab32296d07
Reformat code
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
(cherry picked from commit 470226ed7c)
2025-08-17 19:31:32 +03:00
JRoot Junior
fdfdd847a0
Bump version to 3.22.0 and update changelog 2025-08-17 19:18:42 +03:00
kievzenit
99fa2460da
Migrate motor to pymongo (#1705)
* migrated mongo storage from using deprecated motor to PyMongo

* added storages to __init__.py file to improve DX

* changelog file created

* Revert "added storages to __init__.py file to improve DX"

This reverts commit 5d0f6a9dfb.

* added optional dependency to pymongo to pyproject.toml

* Revert "migrated mongo storage from using deprecated motor to PyMongo"

This reverts commit 1c0207e1d1.

* added deprecation warning to mongo storage

* created pymongo storage

* added entry for PyMongoStorage to documentation in fsm.storages

* updated changelog to have information about how to migrate from MongoStorage to PyMongoStorage

* added test for pymongo storage (copied from mongo storage test)

* fixed formatting using black and isort

* fixed bug in close method of PyMongoStorage (client close method was not awaited)

* added test for PyMongoStorage that checks if storage could be properly closed

* pymongo package changed to be lower case in PyMongoStorage

* added fixture registration for pymongo storage

* test for pymongo is now using proper test fixtures

* removed redundant call to get_data, because we have checked this condition in the previous line

* added more tests to pymongo test, to check for all possible cases of using update_data method

* fixed PyMongoStorage update_data method implementation

* added pymongo tests to test_storages

* fixed pymongo tests, update_data method should not delete document when {} was passed

* Revert "fixed PyMongoStorage update_data method implementation"

This reverts commit 86170e1cb9.

* fixed linting issues in PyMongoStorage

* changed allowed versions of pymongo, to be compatible with motor

* pinned the upper version of pymongo to <4.11
2025-08-17 19:16:47 +03:00
sheldy
6aa6e008c2
Support validating init data using only bot id. (#1715)
* Support validating init data using only bot id.

* Add changes file.

* Add tests.

* Install `signature` dependencies in CI.
2025-08-17 19:15:23 +03:00
Alex Root Junior
ab8af773cf
Added full support for the Bot API 9.2 (#1720)
* Added full support for the Bot API 9.2

* Mark butcher tool output files as linguist-generated in .gitattributes

* Switch `send_date` type from `int` to `DateTime` in suggested post models
2025-08-17 19:07:58 +03:00
Slava Terekhin
ddcedadfbd
fix(utils): use hmac.compare_digest for secure WebApp signature validation (#1710)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
2025-07-19 14:17:27 +03:00
JRoot Junior
7a517f1eba
Bump version to 3.21.0 and update changelog
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
2025-07-05 03:07:18 +03:00
Alex Root Junior
f060c08d16
Add support for Telegram Bot API 9.1 (#1704)
* Add support for Telegram Bot API 9.1 features, including checklists, gifts, and new methods like `SendChecklist`, `EditMessageChecklist`, and `GetMyStarBalance`. Update changelog and improve `True` field descriptions.

* Bump API Version

* Refactor profile photo types to use `InputProfilePhotoType` enums instead of hardcoded literals

* Refactor imports and clean up redundant code across methods, types, and webhook server classes
2025-07-05 03:02:44 +03:00
Alexander
77ca49518e
Relax aiohttp versions range (#1700)
Some checks failed
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
* Relax aiohttp versions range (3.12 -> 3.13)

* Update changelog
2025-06-25 01:22:11 +03:00
sheldy
b488808b30
Correctly pass error message in TelegramMigrateToChat (#1694)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
* Correctly pass error message in `TelegramMigrateToChat`

* Add changes file.
2025-06-04 20:17:14 +03:00
Andrew
e011d103c0
Refactor FSM Storage methods input types to calm down MyPy. (#1683)
Some checks failed
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
* Refactor methods input types to calm down MyPy.
- `FSMContext.set_data`
- `FSMContext.update_data`
- `BaseStorage.set_data`
- `BaseStorage.update_data`
- `BaseStorage`'s child methods
- `SceneWizard.set_data`
- `SceneWizard.update_data`

* Add 1683.feature.rst

* Remove re-init in `DataNotDictLikeError`
2025-05-17 00:37:05 +03:00
Oleg A.
afecf00f4a
Pin Babel's major version (#1686)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
* chore: pin Babel's major version

* docs: add changelog
2025-05-10 14:40:08 +03:00
Andrew
72dd709717
Add support for State type in scenes methods (#1685)
Some checks are pending
Tests / tests (macos-latest, 3.10) (push) Waiting to run
Tests / tests (macos-latest, 3.11) (push) Waiting to run
Tests / tests (macos-latest, 3.12) (push) Waiting to run
Tests / tests (macos-latest, 3.13) (push) Waiting to run
Tests / tests (macos-latest, 3.9) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.10) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.11) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.12) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.13) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.9) (push) Waiting to run
Tests / tests (windows-latest, 3.10) (push) Waiting to run
Tests / tests (windows-latest, 3.11) (push) Waiting to run
Tests / tests (windows-latest, 3.12) (push) Waiting to run
Tests / tests (windows-latest, 3.13) (push) Waiting to run
Tests / tests (windows-latest, 3.9) (push) Waiting to run
Tests / pypy-tests (macos-latest, pypy3.10) (push) Waiting to run
Tests / pypy-tests (macos-latest, pypy3.9) (push) Waiting to run
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Waiting to run
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Waiting to run
* Add support for `State` type to scenes methods like `goto`, `enter`, `get`

Calm down MyPy

* Add 1685.feature.rst
2025-05-09 21:25:41 +03:00
Jasur Yusupov
3812157913
fix: resolve warning "Expected type 'None', got 'Application' instead" (#1689) 2025-05-09 21:24:12 +03:00
Andrew
482629ac18
Fix for #1677 (#1678)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
* Make `as_markup` return `super().as_markup`

* Add 1677.misc.rst

* Update 1677.misc.rst
2025-04-26 16:18:49 +03:00
Alex Root Junior
7a9ecdfbd9
docs: add documentation for changing state of another user in FSM middleware (#1676) 2025-04-26 15:56:19 +03:00
Alex Root Junior
eb84458ff5
fix: ensure middleware data is passed to scene entry handler (#1674)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
* fix: ensure middleware data is passed to scene entry handler

* Add documentation for entering scenes with various methods

* Update changelog
2025-04-17 00:42:39 +03:00
JRoot Junior
a4256950e4
Bump version to .post0 version to update documentation 2025-04-16 23:27:28 +03:00
JRoot Junior
20d36a2ab8
Update changelog 2025-04-15 23:06:42 +03:00
JRoot Junior
50f84ad44c
Bump version
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
2025-04-14 00:04:39 +03:00
Alex Root Junior
da3e84d4cf
Add semaphore support for limiting concurrent updates (#1670)
Some checks are pending
Tests / tests (macos-latest, 3.10) (push) Waiting to run
Tests / tests (macos-latest, 3.11) (push) Waiting to run
Tests / tests (macos-latest, 3.12) (push) Waiting to run
Tests / tests (macos-latest, 3.13) (push) Waiting to run
Tests / tests (macos-latest, 3.9) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.10) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.11) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.12) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.13) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.9) (push) Waiting to run
Tests / tests (windows-latest, 3.10) (push) Waiting to run
Tests / tests (windows-latest, 3.11) (push) Waiting to run
Tests / tests (windows-latest, 3.12) (push) Waiting to run
Tests / tests (windows-latest, 3.13) (push) Waiting to run
Tests / tests (windows-latest, 3.9) (push) Waiting to run
Tests / pypy-tests (macos-latest, pypy3.10) (push) Waiting to run
Tests / pypy-tests (macos-latest, pypy3.9) (push) Waiting to run
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Waiting to run
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Waiting to run
* Add semaphore support for limiting concurrent updates

Introduce a semaphore-based mechanism to control the number of concurrent tasks in polling mode when `handle_as_tasks=True`. Added the `tasks_concurrency_limit` parameter to `start_polling()` and `run_polling()`, preventing potential memory exhaustion during high update loads.

* fix: update variable name for clarity in semaphore creation

* Update aiogram/dispatcher/dispatcher.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-12 23:30:02 +03:00
Alex Root Junior
2c2bd61551
Added full support for the Bot API 9.0 (#1671)
* Added full support for the Bot API 9.0

* Bump version
2025-04-12 23:29:48 +03:00
Вадим Христенко
25e9127db9
[#1653, #1654] docs: fix code block formatting in router.rst (#1666)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
* fix(docs): fix formatting in router.rst

* chore(changelog): add entry for #1666
2025-04-05 20:32:24 +03:00
Suren Khorenyan
870d97c783
fix empty response into webhook (#1665) 2025-04-05 20:31:42 +03:00
LORES
02683b8c37
misc: simplify running non-async callback using asyncio.to_thread (#1661)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
* refactor: simplify running non-async callback using asyncio.to_thread

* add changes
2025-04-02 23:26:43 +03:00
Anton Trotsenko
5547963311
Add different shortcut methods for Text.as_kwargs() (#1657)
* Add different shortcut methods for Text.as_kwargs()

New methods:
- as_caption_kwargs()
- as_poll_question_kwargs()
- as_poll_explanation_kwargs()
- as_gift_text_kwargs()

* Add changelog

* Fix not passing linter checks
2025-04-02 23:16:55 +03:00
chiri
7e8dcc6852
chore: bump pydantic upper bound from <2.11 to <2.12 (#1659)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
* chore: bump `pydantic` upper bound from <2.11 to <2.12

* chore: add changelog file

* Update CHANGES/1659.misc.rst

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2025-03-29 17:41:06 +02:00
JRoot Junior
78748d36fd
Update deep linking documentation and bump version to 3.19.0
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
2025-03-19 21:04:48 +02:00
m-xim
658f1fc082
Fix handling of default empty string ("") in CallbackData filter (#1493)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
* Update callback_data.py

Allows using a default value in the class which is equal to an empty string ("").

Example:
class MyCallbackData(CallbackData, prefix="MyCallbackData"):
    input1: str
    input2: str = ""

* Create 1493.bugfix.rst

* Update callback_data.py

Fixed an issue that prevented unpacking None values.

* Added tests for CallbackData

* Update tests/test_filters/test_callback_data.py

Co-authored-by: Oleg A. <t0rr@mail.ru>

* Update test_callback_data.py

* Update callback_data.py

* Update 1493.bugfix.rst

---------

Co-authored-by: Oleg A. <t0rr@mail.ru>
2025-03-11 00:14:13 +02:00
naz
925616ff79
Added support of "startapp" deep links with "appname" param (#1651)
Some checks are pending
Tests / tests (macos-latest, 3.10) (push) Waiting to run
Tests / tests (macos-latest, 3.11) (push) Waiting to run
Tests / tests (macos-latest, 3.12) (push) Waiting to run
Tests / tests (macos-latest, 3.13) (push) Waiting to run
Tests / tests (macos-latest, 3.9) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.10) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.11) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.12) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.13) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.9) (push) Waiting to run
Tests / tests (windows-latest, 3.10) (push) Waiting to run
Tests / tests (windows-latest, 3.11) (push) Waiting to run
Tests / tests (windows-latest, 3.12) (push) Waiting to run
Tests / tests (windows-latest, 3.13) (push) Waiting to run
Tests / tests (windows-latest, 3.9) (push) Waiting to run
Tests / pypy-tests (macos-latest, pypy3.10) (push) Waiting to run
Tests / pypy-tests (macos-latest, pypy3.9) (push) Waiting to run
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Waiting to run
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Waiting to run
* Added "startapp" deep link support

* Remove link_type param, added create_startapp_link method

* Write tests for create_startapp_link method

* Refactor with black & isort

* Added CHANGELOG

* Added support of direct mini app links

* Added CHANGELOG
2025-03-10 02:29:28 +02:00
Alex Root Junior
cedbe2c500
Update Ukrainian translation files to match latest API changes (#1650)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
* Update translation files with new creation dates.

This update includes newly added and corrected translation entries for various .po files in the Ukrainian locale. It ensures consistency with updated source files and aligns with the latest Telegram bot API changes.

* Update Ukrainian documentation translation
2025-03-08 03:02:33 +02:00
naz
de240b62ac
Added support of "startapp" deep links (#1648)
* Added "startapp" deep link support

* Remove link_type param, added create_startapp_link method

* Write tests for create_startapp_link method

* Refactor with black & isort

* Added CHANGELOG
2025-03-08 02:25:50 +02:00
Alex Root Junior
cd4e811856
Refactor: Introduce Union types for streamlined type handling (#1649)
* Refactor: Introduce Union types for streamlined type handling

Implemented Union types across various modules to consolidate and simplify type annotations. This change replaces repetitive union declarations with reusable Union aliases, improving code readability and maintainability. Updates applied to affected classes, methods, and imports accordingly.

* Refactor unions into type aliases for better reusability

Replaced inline `Union` types with predefined aliases like `MediaUnion`, `ReplyMarkupUnion`, and `ChatIdUnion`. Simplifies type annotations, improves code readability, and reduces duplication. Added `media_union.py` for grouping related media types.

* Refactor type unions with ResultChatMemberUnion and ResultMenuButtonUnion

Replaced verbose type definitions of chat member and menu button unions with `ResultChatMemberUnion` and `ResultMenuButtonUnion` for improved readability and maintainability. Updated relevant methods, modules, and documentation to use the new type aliases consistently.

* Added changelog
2025-03-08 02:19:57 +02:00
Alex Root Junior
843c1dec7c
Typed data (#1647)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
* Add TypedDict support for middleware context data

Introduced `MiddlewareData` and associated TypedDicts to type-hint middleware context data. Updated documentation to include usage examples and guidelines for extending the default middleware data. Also adjusted coverage configuration to exclude the new data module.

* Added more docstrings

* Typo fixes
2025-03-02 01:24:30 +02:00
Alex Root Junior
8b4976b3de
Fix handler registration order in Scene (#1642)
Some checks are pending
Tests / tests (macos-latest, 3.10) (push) Waiting to run
Tests / tests (macos-latest, 3.11) (push) Waiting to run
Tests / tests (macos-latest, 3.12) (push) Waiting to run
Tests / tests (macos-latest, 3.13) (push) Waiting to run
Tests / tests (macos-latest, 3.9) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.10) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.11) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.12) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.13) (push) Waiting to run
Tests / tests (ubuntu-latest, 3.9) (push) Waiting to run
Tests / tests (windows-latest, 3.10) (push) Waiting to run
Tests / tests (windows-latest, 3.11) (push) Waiting to run
Tests / tests (windows-latest, 3.12) (push) Waiting to run
Tests / tests (windows-latest, 3.13) (push) Waiting to run
Tests / tests (windows-latest, 3.9) (push) Waiting to run
Tests / pypy-tests (macos-latest, pypy3.10) (push) Waiting to run
Tests / pypy-tests (macos-latest, pypy3.9) (push) Waiting to run
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Waiting to run
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Waiting to run
* Fix handler registration order in `Scene`

Previously, `Scene` handlers were registered based on the sorted output of `inspect.getmembers`, causing incorrect execution order. Now, handlers are registered in the order they are defined in the class, ensuring reliable behavior and proper sequence when handling filters with varying specificity. Added test cases to validate the correct handler ordering.

* Add dynamic dataclass and class attribute resolvers

Introduced `dataclass_kwargs` to ensure compatibility with different Python versions and modular attribute handling. Added utilities for resolving class attributes dynamically, enhancing flexibility with MRO-based resolvers. Updated tests to verify new features and ensure proper functionality across various scenarios.

* Update changelog
2025-03-01 22:08:14 +02:00
JRoot Junior
e622ada2fc
A little bit of change changelog categories
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.9) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.9) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.9) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.9) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.9) (push) Has been cancelled
2025-02-16 22:45:56 +02:00
JRoot Junior
b6b0ee0497
Correct version 2025-02-16 22:44:57 +02:00
JRoot Junior
82406970c1
Update CHANGES.rst 2025-02-16 22:44:39 +02:00
JRoot Junior
56db08b195
Change changelog 2025-02-16 22:43:41 +02:00
Oleg A.
e17c84144d
Prevent endless loop with buttons (#1626)
* fix: prevent endless loop with buttons

* test: added test for add w/o max width

* docs: added changelog record

* chore: explicit set max_width 0
2025-02-16 22:39:51 +02:00
YóUnǎi
7b07338851
Docs: Fix annotations (#1634)
* Docs: Fix annotations

* Add file CHANGES/1634.doc.rst
2025-02-16 22:37:40 +02:00
Alex Root Junior
d8b9ce1be9
Added full support for the Bot API 8.3 (#1638)
* Added full support for the Bot API 8.3

* Added changelog

* Ignore typing for aiohttp_socks
2025-02-16 22:37:18 +02:00
OneHandedPirate
25833b830e
Update scene.rst (#1640)
* Update scene.rst

* Create 1640.bugfix.rst
2025-02-16 22:14:06 +02:00
monosans
6e81294685
fix: change the Downloadable protocol to be non-writable to shut up type checking that checks code that uses the bot.download(...) method (#1628)
* fix: don't require Downloadable.file_id to be writable

* docs: add changelog

* Update CHANGES/1628.bugfix.rst

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2025-01-19 03:35:44 +02:00
AmirSoroush
bbdc43b737
Fix BAD_PATTERN regex in deeplinking process. (#1630)
* add test payload in `test_deep_linking` to demonstrate the bug

* fix the `BAD_PATTERN` regex

* add changes file
2025-01-17 01:35:23 +02:00
Anton Trotsenko
a516b7f03f
Bump redis max version to <5.3.0 (#1631)
* Bump redis max version to <5.3.0

* Describe changes
2025-01-17 01:29:50 +02:00
VoVcHiC
75fbe544c3
fix typo in ukrainian docs (#1629)
* fix typo in ukrainian docs

* remove "якісь"
2025-01-14 14:03:25 +02:00
Oleg A.
44bd8fe103
Remove path to string convertion (#1612)
* Remove path to string conversion

* docs: changelog added
2025-01-04 10:37:26 +02:00
JRoot Junior
b376949647
Bump version 2025-01-02 02:44:02 +02:00
Alex Root Junior
afccd8a38f
Added full support of Bot API 8.2 (#1623)
* Added full support of Bot API 8.2

* Added changelog

* Try to add port

* Add port to the `test_reset_connector`
2025-01-02 02:38:18 +02:00
Сода
81550997f7
Fix link formatting for Bot API 8.1 support in CHANGES.rst (#1619) 2024-12-30 01:49:40 +02:00
JRoot Junior
38e119052e
Fixed incorrect version 2024-12-22 17:00:04 +02:00
JRoot Junior
1d5405ab43
Bump version 2024-12-21 23:50:49 +02:00
qvvonk
f2e305e92a
Added __call__ method to TelegramMethod class. (#1616)
* Added __call__ method to TelegramMethod class.

* Added rst.

* Moved rst.

* Deleted __call__, changed exception text.

* Changed pull request desc text
2024-12-15 16:00:21 +02:00
Dmitriy
494e07a75a
Increased aiohttp version (#1615)
* Increased aiohttp version

* Added changes file

* Update CHANGES/1615.misc.rst

---------

Co-authored-by: Долгалев Дмитрий Игоревич <didolgalev@domclick.ru>
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-12-14 19:32:21 +02:00
Alex Root Junior
782796c217
Added full support of Bot API 8.1 (#1617)
* Added full support of Bot API 8.1

* Remove  artifacts from types and methods (model_* methods)
2024-12-14 19:30:12 +02:00
Suren Khorenyan
6520b9fba2
[misc] fix tg-emoji closing tag: use constant (#1608)
* fix tg-emoji closing tag: use constant

* add changelog for tg-emoji closing tag fix

* Update CHANGES/1608.misc.rst

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-11-25 22:08:05 +02:00
kewldan
141a550ab2
misc(deps): Bump pydantic version to <2.11 (#1607)
* Bump pydantic max version to <2.11

* CHANGES file

* Update CHANGES/1607.misc.rst

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-11-23 17:54:49 +02:00
JRoot Junior
754535a2aa
Bump version 2024-11-17 23:20:34 +02:00
Alex Root Junior
dfc88fc907
Added full support for Bot API 8.0 (#1606)
* Added full support of Bot API 8.0

* Added tests

* Reformat code

* Added changelog

* Bump API version
2024-11-17 23:18:42 +02:00
JRoot Junior
f2916ca03f
Bump version 2024-11-02 17:02:47 +02:00
Alex Root Junior
a2af73ad78
Added business_connection_id to the Message API methods shortcuts (#1586)
* Add business_connection_id to message API methods

Integrated the business_connection_id attribute into various message manipulation methods, ensuring consistent data handling. This update eliminates the need to pass the business_connection_id as a parameter, instead directly accessing it from the instance attributes.

* Added changelog
2024-11-02 16:55:15 +02:00
Arthur Khachaturov
592267dd99
Add function get_value to BaseStorage (#1594)
* Add function `get_value` to all built-in storage implementations, `FSMContext` and `SceneWizard` (#1431)

* Fix type hints

* Split up return statements in `get_value` functions

* Implement `get_value` method in `BaseStorage` and remove redundant implementations
2024-11-02 16:48:01 +02:00
Alex Root Junior
fd014d2026
Fixed UUID (and other types) serialization in the CallbackData factory. (#1602)
From now UUID will have 32 bytes length instead of 36 bytes.
2024-11-02 16:37:31 +02:00
Alex Root Junior
405bbcc36f
Added full support of Bot API 7.11 (#1601)
* Added full support of Bot API 7.11

* Small fixes

* Added changelog
2024-11-02 16:13:45 +02:00
chiri
4531c3628c
[docs] fix typo (#1599) 2024-10-27 20:03:21 +02:00
Alex Root Junior
51beb48257
Enabled tests on Python 3.13, disabled on Python 3.8 (#1589)
* Try to enable tests on Python 3.13

* Remove support for Python 3.8 and PyPy 3.8

Dropped Python 3.8 and PyPy 3.8 from the CI workflow and updated the minimum required Python version to 3.9 in pyproject.toml. Also updated dependencies and tools to align with the new minimum Python version.

* Added changelog

* Reformat code

* Bump mypy python version
2024-10-19 14:55:38 +03:00
Alex Root Junior
1dbdcf0516
Improved Scene handler and action inheritance mechanism (#1585)
* #1583 Improved Scene handler and action inheritance mechanism

Enhanced the inheritance of handlers and actions in scenes. Refactored to eliminate the copying of previously connected handlers and actions from parent scenes. Now, handlers are dynamically rebuilt based on the current class, properly utilizing class inheritance and enabling handler overrides.

* Added more tests

* Added more tests for non-function handlers
2024-10-06 16:37:18 +03:00
Carl Smedstad
080878be86
Fix pytest-asyncio deprecation warning in test (#1584)
Introduced in pytest-asyncio in:
https://github.com/pytest-dev/pytest-asyncio/pull/648
2024-09-28 01:33:14 +03:00
JRoot Junior
718910f5b5
Release version 3.13.1
Add new version details to CHANGES.rst and update __meta__.py. Removed individual CHANGES/* feature and bugfix files, merging their content into the main CHANGES.rst.
2024-09-18 22:55:32 +03:00
Alex Root Junior
f9f847f603
#1579 Fixed Default object annotation resolution in pydantic models. (#1580)
* #1579 Fixed `Default` object annotation resolution in `pydantic` models. Reformat code.

* Bump mongo and Redis dependencies

* Update pydantic version constraints based on Python version

Adjusted the version constraints for the pydantic library in `pyproject.toml` to ensure compatibility with different Python versions. This helps maintain stability and compatibility across various development environments.

* Adjust version

* Fixed typo
2024-09-18 22:45:19 +03:00
JRoot Junior
b7d61b6379
#1568 Update warning about Arch Linux package in installation docs
The warning previously stated that the Arch Linux package is outdated. It is now revised to indicate that the package may be outdated and recommends using the PyPI package for the latest version. This change ensures users are correctly informed about the potential version differences.
2024-09-18 21:21:06 +03:00
JRoot Junior
46017f814d
#1568 Update installation instructions in docs
Moved warning for outdated package to the top of the Arch Linux section and removed redundant PyPI installation instructions for the development build. This enhances the clarity and accuracy of the installation documentation.
2024-09-18 21:19:21 +03:00
monosans
a76fb42ba0
Bump aiofiles version upper bound to <24.2 (#1577)
* Bump aiofiles version upper bound to <24.2

* Add changelog
2024-09-10 23:40:07 +03:00
Andrew
7297ffa16e
Increase pydantic max version (<2.9 -> <2.10) (#1576)
* Increase `pydantic` max version (2.10)

* Add changes file
2024-09-09 20:05:01 +03:00
JRoot Junior
4bf4f8eac9
Fixed docs build 2024-09-08 15:53:44 +03:00
JRoot Junior
6cebbe29ac
Resolve error created by the dependabot. 2024-09-08 14:15:30 +03:00
JRoot Junior
d9419ba690
Bump version 2024-09-08 14:06:45 +03:00
JRoot Junior
3da419c434
Update newly generated shortcuts to Bot API 7.10 2024-09-08 14:04:43 +03:00
Kostiantyn Kriuchkov
386fc44a98
Feature/aliases inaccessible message (#1575)
* feature: add aliases for InaccessibleMessage type

* add changelog

* fix changelog

* remove methods that may not be accessible for the InaccessibleMessage type, add tests

* apply black isort

* update docs with InaccessibleMessage aliases
2024-09-08 14:00:07 +03:00
Alex Root Junior
e8fc890809
Bot API 7.10 (#1570)
* Bump to the latest schema

* Added full support ob Bot API 7.10

* Add support for purchased paid media events

Enhanced the router to include `purchased_paid_media` handling. Added corresponding test cases to verify the new functionality and updated middleware to return the appropriate `EventContext`.

* Added changelog
2024-09-08 04:01:18 +03:00
dependabot[bot]
fb1e5cad59
Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows (#1571)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 1 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v1...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-04 01:52:12 +03:00
JRoot Junior
f10414c1eb
Restrict 2.0 CLI version 2024-08-17 17:00:10 +03:00
JRoot Junior
e1d9bd5839
Bump CLI version 2024-08-17 16:59:46 +03:00
Alex Root Junior
627ee09928
Fixed link preview options to use global defaults in some types and methods (#1563)
* #1543 Fixed link preview options to use global defaults

Refactor various classes to use global defaults for `link_preview_options`. This change ensures consistency and enhances flexibility in handling link preview options across different components.

* Added changelog
2024-08-17 16:41:52 +03:00
JRoot Junior
6aba60155c
Bump version 2024-08-16 00:46:41 +03:00
Alex Root Junior
c3a08664d3
Added full support of Bot API 7.9 (#1560)
* Added full support of Bot API 7.9

* Added changelog

* Try to fix towncrier

* Fixed towncrier check
2024-08-16 00:44:40 +03:00
Desiders
1c323ecc97
Add getting user from chat_boost (#1474)
* Add getting user from `chat_boost`

* Update import

* Add changelog

* Add test for `resolve_event_context`

* Lint changes

* Parametrize test
2024-08-14 02:12:39 +03:00
Robotvasya
e2e1bc5573
Added message_thread_id to url of chats with topics for message.get_u… (#1469)
* Added message_thread_id to url of chats with topics for message.get_url() (#1451)

* Added tests for message.get_url()

* Added tests for message.get_url()

* Changed tests for message.get_url()
2024-08-14 02:11:58 +03:00
Oleg A.
9b0b6a68ed
Precalculate StateGroup values (#1507)
* Precalculate StateGroup values

* Changelog added

* Remove redundant overrides

* Refactor children preparing

* Refactor mcs fn visibility

* Refactor mcs fn visibility (fix)
2024-08-14 02:10:31 +03:00
JRoot Junior
2215df7a0f
Added FSMStrategy to the documentation 2024-08-14 02:09:31 +03:00
JRoot Junior
60f93b3b46
Bump version 2024-08-09 20:16:28 +03:00
Alex Root Junior
cf3a6c3d59
Added full support of Bot API 7.8 (#1551)
* Added full support of Bot API 7.8

* Added changelog

* Try to fix tests on Windows

* scope=session?

* Try another way

* Just try to set custom event loop policy manually

* Revert "Just try to set custom event loop policy manually"

This reverts commit 04ee60d878.

* Just try to set custom event loop policy manually
2024-08-09 19:10:39 +03:00
Oleg A.
3ba724e2fa
Added aiohttp 3.10 support (#1548)
* added aiohttp 3.10 support

* added changelog
2024-08-01 01:37:24 +03:00
Oleg A.
98c2a4fb57
fixed ruff issues (#1549) 2024-08-01 01:37:07 +03:00
Bogdan
2516f32168
Fix web_app example (#1546)
* Fix url in button

* Fixed URL path in the "Open" button at the `demo/sendMessage` endpoint

* Fix web_app example

* Add changelog

* Restore old changelog
2024-07-27 16:21:45 +03:00
Chuangbo Li
a3d6c1615e
chore(docs): fix defaults.rst (#1541)
Fix parameter name `default`.
2024-07-14 16:54:01 +03:00
Alex Root Junior
ac96f0d233
Added 'as_reply_parameters' method & integrate with message reply methods (#1539)
* Added 'as_reply_parameters' method & integrate with message reply methods

The 'as_reply_parameters' method is added to generate reply parameters in a message. This method was used in reply methods.

* Added changelog
2024-07-13 04:03:49 +03:00
JRoot Junior
d2cd3d0fd8
Bump lint dependencies 2024-07-08 00:39:32 +03:00
JRoot Junior
7807981252
Bump version 2024-07-07 15:55:14 +03:00
Alex Root Junior
4ddc320e21
Added full support of Bot API 7.7 (#1536)
* Added full support of Bot API 7.7

* Added changes description
2024-07-07 15:46:17 +03:00
JRoot Junior
2ac2650165
Typo fix in URL 2024-07-06 21:05:21 +03:00
JRoot Junior
1f41b14f95
Fixed mypy 2024-07-06 20:59:07 +03:00
JRoot Junior
ad28ce9689
Bump version 2024-07-06 20:54:30 +03:00
JRoot Junior
0b595ba5e4
Empty Commit 2024-07-06 20:50:19 +03:00
JRoot Junior
648395c1a2
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2024-07-06 20:48:36 +03:00
JRoot Junior
03409450d0
Reformat code 2024-07-06 20:48:27 +03:00
Alex Root Junior
7f47609585
#1520 Fixed event context resolving for the callback query (#1521)
* #1520 Fixed event context resolving for the callback query that is coming from the business account

* Simplify some conditions

* Added changelog

* Fixed AttributeError
2024-07-06 20:46:45 +03:00
Oleg A
46e033e6da
Add chat member tools (#1527)
* feat: add ChatMemberAdapter

* chore: apply formatter

* docs: added changelog

* docs: rm redundant import

* feat: add pre-defined groups
2024-07-06 20:34:07 +03:00
Oleg A
5f05dfc664
docs: migration feeding updates (#1531) 2024-07-06 20:33:01 +03:00
Oleg A
7a96067952
chore: bump pydantic (#1532) 2024-07-06 20:32:21 +03:00
Alex Root Junior
11efa8e186
Added full support of Bot API 7.6 (#1533)
* Added full support of Bot API 7.6

* Fixed imports

* fix tests (#1534)

* Fixed coverage

* Override InputPaidMedia media type to `str | InputFile`

* Added shortcut

* Fixed PaidMediaType enum

* Added changelog

---------

Co-authored-by: Oleg A <t0rr@mail.ru>
2024-07-06 20:31:49 +03:00
request3301
3baa7383c1
Corrected typo (#1519)
* typo in scene.rst

* Create 1519.doc.rst
2024-06-19 21:07:58 +03:00
JRoot Junior
4b468da109
Fixed version number 2024-06-19 01:28:47 +03:00
JRoot Junior
cad9b3ba76
Towncrier render 2024-06-19 01:10:33 +03:00
JRoot Junior
f288a66cb4
Bump version 2024-06-19 00:59:25 +03:00
Alex Root Junior
1888039cee
Add serialization utilities and update documentation (#1515)
* Add serialization utilities and update documentation

Introduced utilities to deserialize Telegram objects to JSON-compliant Python objects and vice versa. These utilities manage both cases with and without files. The documentation has been updated to reflect these changes, including updates in migration recommendations and tutorials. A new unit test is added to verify the new functionality.

* Fixed Must-die implementation of the datetime serialization

* Fixed `TypeError: can't subtract offset-naive and offset-aware datetimes`
2024-06-19 00:54:36 +03:00
Alex Root Junior
1f7bbeb355
Added full support of Bot API 7.5 (#1518)
* Added full support of Bot API 7.5

* Added changelog

* Update date type in RevenueWithdrawalStateSucceeded

* Added example
2024-06-19 00:54:22 +03:00
Alex Root Junior
dcfc9632f3
Add DNS cache ttl setting to aiohttp session. (#1514)
* Add DNS cache ttl setting to aiohttp session.
Also the limit argument is added to the session initializer.

This commit adds a setting for DNS cache ttl (time-to-live) to the aiohttp session configuration. This is implemented as a workaround for a known issue in aiogram as exhibited in aiogram/aiogram#1500.

* Added changelog
2024-06-17 02:51:35 +03:00
JRoot Junior
835813ca2e
Update chagenlog 2024-06-17 01:06:48 +03:00
beliboba
f568ef09e8
InputFile reuse recommendations update (#1506)
* Update upload_file.rst

who the fuck even wrote this

* Update docs/api/upload_file.rst

Co-authored-by: Yana Malenko <107151775+akchonya@users.noreply.github.com>

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
Co-authored-by: Yana Malenko <107151775+akchonya@users.noreply.github.com>
2024-06-17 00:57:28 +03:00
Rishat-F
1df3adaba1
Fail redis and mongo tests if incorrect URI provided + some storages tests refactoring (#1510)
* Smaller timeout for MongoStorage connection

By default serverSelectionTimeoutMS=30000. This is too much

* Correct ConnectionError for RedisStorage in tests

* Remove unused import in conftest.py

* Refactor skipping redis and mongo tests

* Fail redis and mongo tests if incorrect URI

If incorrect URIs provided to "--redis" and/or "--mongo" options
tests should fail with ERRORs instead of skipping.
Otherwise the next scenario is possible:
  1) developer breaks RedisStorage and/or MongoStorage code
  2) tests are run with incorrect redis and/or mongo URIs
     provided by "--redis" and "--mongo" options.
     For example, wrong port specified.
  3) tests pass because skipping doesn't fail tests run
  4) developer or reviewer doesn't notice
     that redis and/or mongo tests were skipped
  5) broken code gets in codebase

* Remove unused fixtures passing in storages tests

* Define create_storage_key fixture in conftest.py

* Linters formatting

* Changes description

* Revert "Smaller timeout for MongoStorage connection"

This reverts commit d88b7ec612.

* Smaller timeout for MongoStorage connection in tests

The default 30s timeout is too long

* Add test for MongoStorage for 100% coverage

* Linters formatting

* Move skipping redis/mongo tests in earlier fixtures

* Replace vars with constants in conftest.py

* Linters formatting
2024-06-17 00:55:59 +03:00
Oleg A
7760ab1d0d
Bump dev dependencies (#1512)
* Bump dev dependencies

* Pre-commit py3.8 support

* Pre-commit py3.8 support (v3.5+)

* Mute mypy python version bug
2024-06-14 20:11:08 +03:00
Oleg A
0df95a0276
Apply isort (#1508) 2024-06-11 03:08:08 +03:00
Oleg A
69c359d23a
Add Dependencies to migrations guide (#1504)
* Add Dependencies to migrations guide

* Added changelog
2024-06-07 18:52:02 +03:00
JRoot Junior
0335bb14fc
Small changes in the changelog 2024-06-01 02:29:17 +03:00
JRoot Junior
9bab51c908
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2024-06-01 01:58:41 +03:00
JRoot Junior
b64587d4a7
Bump version 2024-06-01 01:58:32 +03:00
Alex Root Junior
afd1e6da74
Added MongoDB dependency to ReadTheDocs configuration (#1502)
* Add MongoDB dependency to ReadTheDocs configuration

An update has been made to the ReadTheDocs configuration file to include MongoDB as an additional dependency on installation. This change addresses issues with the MongoStorage section in the documentation.

* Rename changelog file
2024-06-01 01:56:38 +03:00
JRoot Junior
0c2ef663da
Fixed version number in changelog 2024-05-31 21:01:55 +03:00
JRoot Junior
e224bb162d
Bump changelog and API version 2024-05-31 20:22:51 +03:00
sdmway
e3dc7d576b
misc: code consistency and bot instance creation (#1482)
* misc: code consistency and bot instance creation

* Changelog for aiogram#1482

* misc: consistency of comments and dispatcher instance creation

* misc: removed routers example

* Update CHANGES/1482.misc.rst

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-05-31 20:11:21 +03:00
Alex Root Junior
b08ba78898
Added full support of Bot API 7.4 (#1498)
* Added full support of Bot API 7.4

* Added changelog
2024-05-31 20:07:11 +03:00
Alexey Berezin
f50e058725
Fixed bug with wrong MarkdownV2 custom emoji parsing (#1497)
* fixed bug with wrong markdownv2 custom emoji parsing

* added changelog of 1496 issue

* Update CHANGES/1496.bugfix.rst

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-05-30 20:58:51 +03:00
Alex Root Junior
b5d94f17b5
Removed deprecated arguments from Bot class (#1494)
* Remove deprecated attributes from Bot class

The deprecated attributes `parse_mode`, `disable_web_page_preview`, and `protect_content` have been removed from the Bot class. Additionally, the associated warnings and test cases have been deleted. These attributes should now be passed using the `default=DefaultBotProperties(...)` syntax instead.

* Added docs and changelog
2024-05-27 14:58:39 +03:00
JRoot Junior
895f4f8dce
Reformat code 2024-05-11 01:57:24 +03:00
JRoot Junior
972eeafce5
#1485 Fixed slots on MagicData filter 2024-05-11 01:57:16 +03:00
JRoot Junior
a7d3e9a720
Bump version 2024-05-07 22:43:07 +03:00
Rishat-F
1ef7655fd7
Added MongoStorage for FSM (#1434)
* Mongo storage included to storages test

* Added few additional checks in storages test

* Added MongoStorage for FSM

* Added changes description

* Fixed error message syntax

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>

* Resolved mypy check error

* IF/ELSE statement simplified

* Fix ruff linter error: RET505 Unnecessary `elif` after `return` statement

* Fix ruff linter error: E501 Line too long (100 > 99)

* Added mongo storage testing in CI

* Refactoring while review

* Refactoring while review

* Storing FSM state and data together in MongoDB-storage

* Fix CI - MongoDB container action is only supported on Linux

* Refactoring while review

* Enable Macos in pypy-tests section of CI

* Refactoring while review

* Makefile updated

* redis and mongo storages tests do not run in pypy-tests job of CI

* Fix docstring of DefaultKeyBuilder

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-05-07 22:42:31 +03:00
JRoot Junior
25c76b7d74
Bump docs 2024-05-07 00:02:31 +03:00
DaniilKosvintsev
f45863a0b9
Added message serialisation and deserialization block in 2.x -> 3.x migration guide (#1479)
* Added message serialisation and deserialization block in 2.x -> 3.x migration guide

* fixed docs, added to_python() pydantic alternative

* fixed docs, added examples

---------

Co-authored-by: DanZ-ix <vpupkin@company.com>
2024-05-06 23:28:38 +03:00
Alex Root Junior
cf2980a9c1
Full support of Bot API 7.3 (#1480)
* Added full support of Bot API

* Added full support of Bot API

* Fixed tests

* Added changelog

* Bump version
2024-05-06 23:27:54 +03:00
sdmway
6d655330af
docs: Correct a typo error (#1473) 2024-04-30 23:35:56 +03:00
Alexey Leshchenko
849482da1f
Update command.rst (#1470)
Fix rendition of the backslash in regular expressions
2024-04-24 22:38:26 +03:00
JRoot Junior
6ad287c329
Bump changelog 2024-04-24 22:14:34 +03:00
unintended
f1c9fc50f0
Fix missing error logging (#1458)
* Fix missing error logging 

No error logging when handle_in_background=True

* add CHANGES
2024-04-23 13:59:13 +03:00
Alex Root Junior
4729978c60
Add context manager support for bot client (#1468)
* Add context manager support for bot client

The bot client now supports the context manager protocol, providing automatic resource management. This enhancement helps to automatically close the session when leaving the context, which cleans up resources better. The documentation and tests have been updated accordingly to illustrate this new feature. Moreover, an example of usage without a dispatcher has been provided to clarify its use in simple cases.

* Added changelog
2024-04-22 23:42:47 +03:00
Joren Hammudoglu
9756dac877
loosened pydantic upper bound to <2.8 (#1460)
* bump pydantic to 2.8

* add changelog entry for #1460
2024-04-22 13:49:34 +03:00
Alex Root Junior
057478621b
Added full support of Bot API 7.2 (#1444)
* Added base support of Bot API 7.2

* Added base support of Bot API 7.2

* Fixing tests and content types for Telegram Bot API 7.2 update (#1453)

* Fixing tests and content types for Telegram Bot API 7.2

* Adding changelog for 1453 PR

* Fixes + coverage

* Replace `BusinessConnection.date` type

* Reformat code

* Refactor UserContextMiddleware to use EventContext class

This update significantly refactors UserContextMiddleware to leverage a new class, EventContext. Instead of resolving event context as a tuple, it now produces an instance of EventContext. Additional adjustments include supporting a business connection ID for event context identification and facilitating backwards compatibility. Tests and other files were also updated accordingly for these changes.

* Cover FSM key builder (business_connection_id

* Added changelog

---------

Co-authored-by: RoLOQ <roman.fedunn@gmail.com>
2024-04-22 13:48:49 +03:00
Oleg A
5f157beb26
Bump actions versions (#1459)
* chore: bump actions versions

* chore: add pypy310
2024-04-17 14:09:19 +03:00
Yana Malenko
b49939aaff
add default bot properties and clean imports (#1447) 2024-04-09 01:27:29 +03:00
avoidaway
acf52f468c
chore: remove repetitive words (#1438)
Signed-off-by: avoidaway <cmoman@126.com>
2024-03-17 02:20:29 +02:00
Maxim
506dacc0ff
Added message_thread_id parameter to ChatActionSender class methods (#1437)
* Added message_thread_id parameter to ChatActionSender class methods

* Added changelog

* rename chagelog file
2024-03-11 21:53:17 +02:00
Alex Root Junior
0c9eeda8a7
Fixed poll answer FSM context (#1436)
* Add voter_chat to poll_answer event handling

The change ensures that when a poll_answer event is processed, the user context middleware now also returns the chat where the vote took place. Previously, only the user who cast the vote was returned.

* Added changelog

* Fixed tests

* Bump Python version in test
2024-03-10 16:18:41 +02:00
JRoot Junior
30cee817f4
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2024-03-09 00:40:59 +02:00
JRoot Junior
bc08d90ce5
More tests for defaults 2024-03-09 00:40:46 +02:00
JRoot Junior
ee71117807
Bump pydantic version 2024-03-09 00:38:37 +02:00
Leroy-bit
a2e75e5345
doc updated for WebApp (#1433)
Added WebAppChat class to WebApp docs, updated uk_UA localisation of WebApp docs.
2024-03-06 01:37:37 +02:00
Kostiantyn Kriuchkov
a585fb08de
Add missing Telegram WebApp API classes and fields (#1424) (#1425)
* Add missing Telegram WebApp API classes and fields (#1424)

* Implemented `WebAppChat` class with fields `id`, `type`, `title`, `username`, and `photo_url` as per Telegram documentation.
* Modified `WebAppUser` class by adding `is_premium`, `added_to_attachment_menu`, and `allows_write_to_pm` fields.
* Modified `WebAppInitData` class to include `chat`, `chat_type`, `chat_instance` fields for full API support.

* fix changelog file name

* fix line too long
2024-02-26 02:13:32 +02:00
JRoot Junior
a37deff396
Fixed typo in the changelog 2024-02-17 10:46:50 +02:00
JRoot Junior
27dddff7f5
Update changelog + version 2024-02-17 10:21:41 +02:00
Alex Root Junior
53849b01a7
Fixed default LinkPreviewOptions JSON serialization (#1419)
* Fixed default link preview options serialization

* Added changelog
2024-02-17 10:10:50 +02:00
JRoot Junior
eef50a2edb
Bump API version in the docs 2024-02-16 23:48:54 +02:00
JRoot Junior
eaa56623ff
Render changelog 2024-02-16 23:47:06 +02:00
Alex Root Junior
75323ac8c3
Added full support of Bot API 7.1 (#1417)
* Added full support of Bot API 7.1

* Added changelog
2024-02-16 23:44:35 +02:00
JRoot Junior
e5176b4434
Update docs translation files 2024-02-16 01:17:09 +02:00
JRoot Junior
18b32f065d
Update changelog 2024-02-16 01:15:12 +02:00
JRoot Junior
0cf5afeb99
Add deprecation warnings to Bot properties
Three properties of the Bot class - parse_mode, disable_web_page_preview, and protect_content - have been marked as deprecated with proper warning messages. The associated tests have also been added to confirm the working of these deprecation warnings. Users are advised to use the updated alternatives specified in the warning messages.
2024-02-16 01:13:51 +02:00
JRoot Junior
e6e2601d4b
Fixed typehints in keyboard builder 2024-02-13 22:09:48 +02:00
Robotvasya
298e9821a4
Add notion Working with plural forms in documentation (#1409) 2024-02-09 21:30:02 +02:00
JRoot Junior
091b82e13f
Change magic filter examples 2024-02-09 21:27:21 +02:00
JRoot Junior
f7af9e7f4a
Fixed deep linking URL 2024-02-04 01:49:39 +02:00
Egor
bff483b8a7
Update message.send_copy: add missing reply_parameters param (#1403)
* Update message.send_copy: add missing reply_parameters param

* added changes file

* update changes file

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-02-03 19:25:14 +02:00
Alex Root Junior
844d6f58f5
Update KeyboardBuilder utility, fixed type-hints for button method, a… (#1399)
* Update KeyboardBuilder utility, fixed type-hints for button method, adjusted limits of the different markup types to real world values.

* Added changelog

* Fixed coverage

* Update aiogram/utils/keyboard.py

Co-authored-by: Suren Khorenyan <surenkhorenyan@gmail.com>

* Fixed codestyle

---------

Co-authored-by: Suren Khorenyan <surenkhorenyan@gmail.com>
2024-01-27 19:01:19 +02:00
Alex Root Junior
d3c63797b0
Add KeyboardButtonPollTypeType enum (#1398)
* Add KeyboardButtonPollTypeType enum

A new enum, KeyboardButtonPollType, has been added and documented. This enum holds types of polls that can be created and sent when the corresponding button is pressed. It is now imported and included in the aiogram enums documentation.

* Added changelog
2024-01-27 18:04:05 +02:00
JRoot Junior
eeafe4696c
Bump version 2024-01-27 17:20:29 +02:00
Alex Root Junior
24f59da70d
Reworked bot-wide defaults (#1392)
* Reworked defaults

* Added changelog and partial docs
2024-01-27 17:19:45 +02:00
JRoot Junior
1281bf551a
Describe new event observers in the docs 2023-12-31 15:21:41 +02:00
JRoot Junior
d394af83bd
Update docs 2023-12-31 11:51:00 +02:00
JRoot Junior
233d3c469d
Towncrier 2023-12-31 03:06:18 +02:00
Alex Root Junior
6795b3de05
Added support for Bot API 7.0 (#1387)
* Added support for Bot API 7.0

* Fixed available tests

* Fixed text decorations

* Bot API 7.0 tests for ForwardMessages

* Bot API 7.0 tests for CopyMessages

* Bot API 7.0 tests for DeleteMessages

* Bot API 7.0 tests for GetUserChatBoosts

* Bot API 7.0 tests for SetMessageReaction

* Fixed custom_emoji attribute name

* Fixed tests

* Test parsing CallbackQuery message (inaccessible and accessible)

* Added changes description

* Bot API 7.0 tests for dispatcher handle update message_reaction

* Bot API 7.0 tests for dispatcher handle update message_reaction_count

* Bot API 7.0 tests for dispatcher handle update chat_boost

* Bot API 7.0 tests for dispatcher handle update removed_chat_boost

* fix tests: update ReactionTypeCustomEmoji custom_emoji -> custom_emoji_id

* micro fix Markdown V2 blockquote

* add tests for Markdown tools

* fix markdown test apply single entity

* add tests coverage for Message.react

* check that all messages and content types are covered for Message.content_type

* sort imports in tests (run `make reformat lint`)

* update Giveaway objects Unix time field to DateTime type

* Update Message.content_type property

* upgrade tests for message content_types and sent_copy

* Update Giveaway type generation config

* Update GiveawayWinners and PassportFile types generation configs

---------

Co-authored-by: Suren Khorenyan <surenkhorenyan@gmail.com>
2023-12-31 01:40:44 +02:00
SM CheeseNick
756cfeba0a
Update dispatcher.py (#1384)
On line 576 corrected typo in world more (was mre)
2023-12-23 01:47:38 +02:00
JRoot Junior
a2e5f9a8b8
Update changelog 2023-11-24 23:29:21 +02:00
JRoot Junior
69a07e3b0c
Update docs 2023-11-24 21:55:58 +02:00
JRoot Junior
fc9e2b82c6
Added page for deep linking util 2023-11-24 21:27:03 +02:00
JRoot Junior
94939660c7
Update texts 2023-11-24 21:26:33 +02:00
Alex Root Junior
c8dff11d1e
Update thumbnail type to InputFile only (#1374)
* Update thumbnail type to InputFile only

The thumbnail's type restriction has been changed in several methods and types. Previously, it accepted Union[InputFile, str], allowing both InputFile instances and strings. Now it's changed to accept only InputFile instances. This change enhances meaning of the thumbnail fields in due to Bot API accepts only InputFile instances.

* Added changelog

* Fixed typehints
2023-11-24 21:10:02 +02:00
JRoot Junior
09af2a1c8b
Fixed lines range 2023-11-23 02:27:03 +02:00
JRoot Junior
ead79a1927
Fixed typo 2023-11-23 01:56:26 +02:00
JRoot Junior
423796a445
Added translation for Scenes 2023-11-23 01:28:11 +02:00
Alex Root Junior
3d63bf3b99
PoC Scenes (#1280)
* Base implementation

* Small refactoring + added possibility to specify post-action on handlers

* Move scene properties to config object

* Revise aiogram/scenes with wizard-based design pattern

Modified files in aiogram/scenes to incorporate the Wizard design pattern. Files affected are _marker.py, _registry.py, _wizard.py and __init__.py. The changes introduced a SceneWizard Class and ScenesManager, both of which aid in controlling navigation between different scenes or states. This helps clarifying the codebase, streamline scene transitions and offer more control over the app flow.

* Added example

* Small optimizations

* Replace ValueError with SceneException in scenes. Added error safety in scene resolver.

* str

* Added possibility to reset context on scene entered and to handle callback query in any state

* Remove inline markup in example

* Small changes

* Docs + example

* Small refactoring

* Remove scene inclusion methods from router

The methods for including scenes as sub-routers have been removed from the router.py file. Instead, the SceneRegistry class is now set to register scenes by default upon initializing. This streamlines the scene management process by removing redundant routers and making registration automatic.

* Init tests

* Small fix in tests

* Add support for State instance in the scene

The aiogram FSM scene now allows the use of State instance as an argument, enabling more customization. Modified the 'as_handler' method to receive **kwargs arguments, allowing passing of attributes to the handler. An additional type check has been also added to ensure the 'scene' is either a subclass of Scene or a string.

* Fixed test

* Expand test coverage for test_fsm module

The commit enhances tests for the test_fsm module to improve code reliability. It includes additional unit tests for the ObserverDecorator and ActionContainer classes and introduces new tests for the SceneHandlerWrapper class. This ensures the correct functionality of the decorator methods, the action container execution, and the handler wrapper.

* Reformat code

* Fixed long line in the example

* Skip some tests on PyPy

* Change mock return_value

* Compatibility...

* Compatibility...

* Compatibility...

* Added base changes description

* Scenes Tests (#1369)

* ADD tests for `SceneRegistry`

* ADD tests for `ScenesManager`

* ADD Changelog

* Revert "ADD Changelog"

This reverts commit 6dd9301252.

* Remove `@pytest.mark.asyncio`, Reformat code

* Scenes Tests. Part 2 (#1371)

* ADD tests for `SceneWizard`

* ADD tests for `Scene`

* Refactor ObserverDecorator to use on.message syntax in test_scene.py
Cover `Scene::__init_subclass__::if isinstance(value, ObserverDecorator):`

* Refactor `HistoryManager` in `aiogram/fsm/scene.py`
Removed condition that checked if 'history' is empty before calling 'update_data' in 'Scene'.

* ADD tests for `HistoryManager`

* Small changes in the documentation

* Small changes in the documentation

* Small changes in the documentation

---------

Co-authored-by: Andrew <11490628+andrew000@users.noreply.github.com>
2023-11-23 00:41:21 +02:00
JRoot Junior
ce4e1a706d
#1370 added possibility to check X | None on Python >= 3.10 2023-11-20 22:49:55 +02:00
Oleg A
e17e3bc71c
Fix CallbackData without default Optional (#1370)
* fix: CallbackData set optional as None

* docs: add fix changelog

* Add support for nullable fields in callback data

This update extends the callback data handling by adding support for nullable fields. The code now uses the Python typing structures `Optional` and `Union` to parse such fields correctly. A helper function `_check_field_is_nullable` has been added to assist in efficiently checking if a given field is nullable.

* Add support for nullable fields in callback data

This update extends the callback data handling by adding support for nullable fields. The code now uses the Python typing structures `Optional` and `Union` to parse such fields correctly. A helper function `_check_field_is_nullable` has been added to assist in efficiently checking if a given field is nullable.

---------

Co-authored-by: JRoot Junior <jroot.junior@gmail.com>
2023-11-20 22:39:09 +02:00
JRoot Junior
ebade3d51f
Merge test+pypy tests but with separated jobs 2023-11-18 21:45:22 +02:00
JRoot Junior
7b0a6d2050
Separate PyPy tests and disable Windows PyPy tests 2023-11-18 21:43:16 +02:00
JRoot Junior
82f9365180
Try to disable PyPy tests on Windows 2023-11-18 21:35:30 +02:00
JRoot Junior
dd1e8085bf
Fixed Py3.12 tests 2023-11-18 21:28:34 +02:00
Nachtalb
c1bafea3e8
Upgrade to py12 (#1354)
* Upgrade to py12 compatible aiohttp beta version

* Fix uvloop deprecation warning causing pytest not to run

* Fix test due to asyncio task scheduling race condition

* Fix test_state_in_unknown_class for Python 3.12+ due to PEP 678 changes

* Add Python 3.12 support in GitHub Actions and project configurations

* Add changelog entry

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2023-11-18 21:24:19 +02:00
JRoot Junior
c208bcf748
Reformat code 2023-11-17 00:28:47 +02:00
JRoot Junior
0fc718deeb
Small changes in the pending changelog 2023-11-17 00:27:30 +02:00
JRoot Junior
5b59ca679a
Ignore PytestUnraisableExceptionWarning again 2023-11-16 12:40:52 +02:00
JRoot Junior
7e45f482d4
Enable filterwarnings 2023-11-16 12:37:15 +02:00
JRoot Junior
9bced29923
Update translation files 2023-11-16 02:34:57 +02:00
Alex Root Junior
3ad5ed6bc2
Fixed ResourceWarnings in tests (#1366)
* #1320 Update pytest configuration and tests cleanup

This commit modifies the pytest's configuration file, `pyproject.toml`, to remove filterwarnings settings. It also makes changes in various test files; the Redis isolation test is now using the provided `redis_storage` fixture instead of setting up its own connection, pytest.mark.filterwarnings is no longer used in `test_isolation.py` and `test_aiohttp_session.py` properly closes off sessions.

* Added changelog

* Fixed coverage for the RedisEventIsolation
2023-11-16 02:08:36 +02:00
Oleg A
9a2a72fe97
Add pydantic 2.5 support (#1361)
* chore: add pydantic 2.5 support

* docs: add changelog
2023-11-14 12:35:37 +02:00
JRoot Junior
29d766fef2
#1006 Update parameter description in chat_action.py
The comment describing the 'initial_sleep' parameter in the chat_action.py script has been revised for clarity. It now accurately specifies this parameter's purpose as the waiting period prior to the first sending of the action, rather than just the first iteration.
2023-11-14 02:57:23 +02:00
JRoot Junior
2f1ae0a686
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2023-11-14 02:54:34 +02:00
JRoot Junior
6153b4f805
#1314 Mention that event can be skipped 2023-11-14 02:53:13 +02:00
Egor
7b30caed53
chore(docs): update middleware.rst (#1353)
* Update middleware.rst

* changes
2023-11-14 02:44:04 +02:00
RootShinobi
e76f4c38ad
new improved CallableMixin (#1357)
* optimized CallableMixin

* changes and Sets

* reformatted

* Update CHANGES/1357.misc.rst

Co-authored-by: Oleg A. <t0rr@mail.ru>

---------

Co-authored-by: Oleg A. <t0rr@mail.ru>
2023-11-13 21:04:58 +02:00
Kostiantyn Kriuchkov
9b5e462068
Add current handler to filters, so that flags can be retrieved from it. (#1360)
* Add current handler to filters, so that flags can be retrieved from it.

* run black isort

* add changelog

* Update CHANGES/1360.bugfix.rst

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2023-11-13 21:03:21 +02:00
Alex Root Junior
228a86afdc
Refresh translation files 2023-10-29 02:32:40 +03:00
Alex Root Junior
a355daba49
Re-generate Bot API 2023-10-29 02:15:50 +03:00
Alex Root Junior
180a7297ff
Update typing-extensions version range in dependencies (#1352)
This commit changes the version requirements for typing-extensions in the dependencies section of pyproject.toml file. This change now requires versions that are greater than or equal to 4.7.0 and less than or equal to 5.0. The previous version, 4.8.0, has been found to cause compatibility issues with some other libraries.
2023-10-28 23:09:30 +03:00
Alex Root Junior
475b1861e5
Update citation 2023-10-27 00:50:21 +03:00
Alex Root Junior
e3def608f1
Add CITATION.cff for automatic academic citation (#1351)
* Add CITATION.cff for automatic academic citation

A `CITATION.cff` file has been added to the project to facilitate the generation of accurate academic citations directly from the GitHub page. This allows users to easily copy the citation and paste it into their academic papers. The file includes the project's information like title, authors, repository code, url, keywords, and license.

* Fixed category name
2023-10-27 00:48:47 +03:00
ZeroN
d8e7801963
Add new FSM strategy CHAT_TOPIC strategy.py (#1344)
* Create 1343.feature.rst

* Add new FSM strategy CHAT_TOPIC strategy.py

* ADD CHAT_TOPIC tests test_strategy.py

* Update 1343.feature.rst

* Update strategy.py

* add typing  user_id: Optional[int] = None, middleware.py

* add typing  user_id: Optional[int] = None  base.py

* Update strategy.py

* Update strategy.py

* Update middleware.py

* Update base.py

* Update test_strategy.py

* Update base.py

* Update strategy.py
2023-10-22 00:41:13 +03:00
Alex Root Junior
3b21262d34
Skip unused ignore 2023-10-21 22:09:46 +03:00
Alex Root Junior
eef277ae65
Ignore uvloop attr-defined 2023-10-21 22:04:10 +03:00
Alex Root Junior
1cf6ce251b
Fixed ruff command 2023-10-21 21:48:22 +03:00
Alex Root Junior
0a9bee4bd2
Bump dependencies 2023-10-21 21:44:52 +03:00
Alex Root Junior
c6c838f689
Update ReadTheDocs configuration (#1345) 2023-10-21 19:31:48 +03:00
VasBrd
98771fdf31
Update base.rst (#1340)
* Update base.rst

Typo correction

* Create 1340.doc.rst
2023-10-18 22:00:25 +03:00
Alex Root Junior
cf3044687a
Update changelog instructions in PR workflow
Updated the instructions for adding changelog entries in the pull_request_changelog.yml workflow file. The changes provide more specific instructions on how to name and write the changelog entry file. This was done to provide clearer instructions to contributors updating the changelog.
2023-10-08 19:22:58 +03:00
Alex Root Junior
a2ed142557
Remove stale texts 2023-10-08 19:15:53 +03:00
Alex Root Junior
d180fd7a46
Update texts, remove dummy translation files 2023-10-08 19:14:12 +03:00
Suren Khorenyan
564292dd79
Fix send_copy helper parse mode (#1332)
* Fix send_copy helper parse mode

* Add changelog for bugfix 1332
2023-10-08 18:56:30 +03:00
Sergey Akentev
cad42580dd
Prevent update handling task pointers from being garbage collected, backport of #1328 (#1331)
* Preserve update handling task pointers, backport of #1328

* Changelog

* Typing improvements
2023-10-08 18:13:06 +03:00
Alex Root Junior
f681afb879
Bump version 2023-10-08 18:00:50 +03:00
Alex Root Junior
67382553e5
Update dependencies (#1327)
* Update dependencies

* Added changelog
2023-10-01 16:22:26 +03:00
Kostiantyn Kriuchkov
b5ef05c01a
Corrected grammatical errors, improved sentence structures, translation for migration 2.x-3.x (#1302)
* Corrected grammatical errors, improved sentence structures for clarity, added translation to migration_2_to_3.rst

* add changelog

* Update method name in docs for error handling

* Update migration_2_to_3.rst

Co-authored-by: Oleg A. <t0rr@mail.ru>

* Update migration_2_to_3.rst

Co-authored-by: Oleg A. <t0rr@mail.ru>

* Update migration_2_to_3.rst

Co-authored-by: Oleg A. <t0rr@mail.ru>

* Update docs/locale/uk_UA/LC_MESSAGES/api/methods/set_sticker_set_thumb.po

Co-authored-by: Oleg A. <t0rr@mail.ru>

* rollback unnecessary change for error attribute

---------

Co-authored-by: Oleg A. <t0rr@mail.ru>
2023-10-01 15:29:18 +03:00
Oleg A
eacea996d4
Handle expected warnings & raise unexpected warnings (#1315)
* chore: replace fixture loop with event_loop

* chore: mark expected warnings

* chore: raise unexpected warnings

* chore: rm unused record

* fix: rm parenthesized context manager

* chore: warnings shall not pass

* chore: replace fixture loop with event_loop

* chore: mark expected warnings

* chore: raise unexpected warnings

* chore: rm unused record

* fix: rm parenthesized context manager

* chore: warnings shall not pass

* Revert "chore: raise unexpected warnings"

This reverts commit 4c91df243d.

* chore: warnings shall not pass v2

* fix: graceful aiohttp session close

* chore: minor typo

* chore: mark expected warnings

* fix: temporary mute ResourceWarning

#1320

* fix: close pool with redis

* chore: code reformat and lint

* chore: simplify tests with fixture

* chore: make aresponses clear

* chore: divide asserts with blank line

* chore: rm duplicated assertions

* chore: rm unnecessary extra

* chore: bump test dependencies

* chore: bump test dependencies (fix)
2023-10-01 15:28:54 +03:00
fulsiram
890a57cd15
Fix broken link in message.rst (#1325) 2023-09-29 11:04:42 +03:00
Alex Root Junior
0895e0f49c
Bump version 2023-09-25 19:07:47 +03:00
Oleg A
1dcb830b9d
Fix pydantic version (#1322)
* fix: fix pydantic version

* docs: changelog add
2023-09-25 19:04:16 +03:00
Alex Root Junior
c3dc6fe7a8
Changelog 2023-09-22 18:11:30 +03:00
Alex Root Junior
fec138977d
Telegram Bot API 6.9 (#1319)
* Added support for Bot API 6.9

* Bump API

* Added changelog
2023-09-22 17:46:57 +03:00
Alex Root Junior
a0828f6ddf
#1317 Fixed priority of events isolation (#1318) 2023-09-21 22:54:48 +03:00
Oleg A
8a77939d5b
Update deprecated pydantic fields access (#1309)
* chore: update deprecated pydantic fields access

* chore: add type hints for test

* fix: 3.9- type support
2023-09-19 17:44:39 +03:00
Oleg A
490381b57f
chore: apply lint&reformat (#1307) 2023-09-19 17:43:43 +03:00
Oleg A
ac62184443
fix: new towncrier docs link (#1306) 2023-09-19 17:43:10 +03:00
Oleg A
83a01f014c
fix: added absent params for button builders (#1304)
* fix: added absent params for button builders

* docs: added changelog

* fix: renamed changelog item
2023-09-19 17:42:09 +03:00
Oleg A
c229cf8c7b
Updated migration guide with API server (#1299)
* docs: updated migration guide with API server

* Update docs/migration_2_to_3.rst

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2023-09-11 00:34:02 +03:00
Alex Root Junior
69c2e1282f
Update filtering docs page 2023-09-10 22:42:32 +03:00
Alex Root Junior
28cc2384e8
Fixed typo 2023-09-07 22:44:05 +03:00
Alex Root Junior
b94123de3d
Remove commands= from examples 2023-09-06 00:50:46 +03:00
Alex Root Junior
b56628bb2e
Update dates interval in license file 2023-09-03 03:16:48 +03:00
Oleg A
995a0d7e9b
Custom encoding support (#1278)
* Custom encoding support in deep-linking
2023-09-03 00:26:57 +03:00
Alex Root Junior
5cf8d7b565
Add MediaGroupBuilder for media group construction (#1293)
Implemented a MediaGroupBuilder class in 'aiogram/utils/media_group.py' to help construct media groups. The class supports addition of different media types (audio, photo, video, document) to the media group with a maximum limit of 10 files. The functionality is demonstrated and usage is documented in 'docs/utils/media_group.rst'. Added related test cases in 'tests/test_utils/test_media_group.py'. This is to streamline and simplify the process of media group creation
2023-09-03 00:25:31 +03:00
Alex Root Junior
8fd110cdd1
Bump version 2023-09-03 00:01:22 +03:00
Alex Root Junior
0161322598
Bump changelog 2023-09-01 18:04:42 +03:00
Alex Root Junior
04bd0c9e7c
Fixed error overlapping when validation error is caused by remove_unset root validator in base types and methods. (#1290)
* Ensure base type validation can handle non-dictionary values

The update introduces a condition to verify whether the values being validated are a dictionary before attempting to handle UNSET_TYPE in the aiogram base type. This adjustment helps to prevent potential errors or incorrect validation when non-dictionary values are faced.

* Added a test case for non-dictionary input in remove_unset method

* Added changelog

* Fixed tests
2023-08-29 02:01:54 +03:00
Alex Root Junior
e1be9dd668
Fix Message.send_copy method for stories (#1287)
* Fix `Message.send_copy` method for stories

Fixed an issue with the `Message.send_copy` method, which was not functioning properly with story-type messages. The `ForwardMessage` logic has been added to the method to enable copying of stories, in addition to other types. Tests and documentation have also been updated to reflect these changes.

* Typo fix
2023-08-28 22:32:11 +03:00
Alex Root Junior
6eb5ef2606
Replace datetime.datetime with DateTime across codebase (#1285)
* #1277  Replace datetime.datetime with DateTime across codebase

Replaced all instances of standard library 'datetime.datetime' with a new 'DateTime' type from `.custom` module. This change is necessary to make all date-time values compatible with the Telegram Bot API (it uses Unix time). This will simplify the conversion process and eliminate potential errors related to date-time format mismatches. Changed codebase, butcher files, and modified 'pyproject.toml' to shift the typing-extensions dependency. The 'aiogram/custom_types.py' file was renamed to 'aiogram/types/custom.py' to better reflect its nature as a location for custom types used in the aiogram library.
2023-08-27 17:09:56 +03:00
Alex Root Junior
397f30b58b
Fixed method :code:Message.send_copy for stickers (#1284) 2023-08-26 23:24:51 +03:00
Alex Root Junior
ca4c1b4b95
Small documentation improvements and texts update 2023-08-26 23:18:20 +03:00
Alex Root Junior
806f8f67d5
Bump version 2023-08-26 22:38:22 +03:00
Alex Root Junior
2cf224da49
Reformat code 2023-08-26 22:34:30 +03:00
Alex Root Junior
ee8e457c5f
#1281 Fix magic operation .as_ for values interpreted as False (#1283)
Modified the ".as_" method in the magic filter class to correctly handle values that are interpreted as `False` such as `0`. Previously, the method incorrectly dismissed these valid values. The issue was identified and fixed to ensure correct handling of all valid data inputs.
2023-08-26 22:33:32 +03:00
onejeuu
bff2ed0a86
Fix markdown italic quote (#1282)
* Fix markdown italic quote

* Add changelog
2023-08-26 22:31:30 +03:00
Alex Root Junior
b7be9c2b81
Small cleanup in examples 2023-08-21 01:13:19 +03:00
Alex Root Junior
787ad6b094
Render changelog 2023-08-18 20:21:01 +03:00
Alex Root Junior
a0ae934c14
Bump minimum magic-filter version 2023-08-18 20:19:31 +03:00
Alex Root Junior
678b3cfe7d
Bot API 6.8 (#1276)
* Prepare for Bot API 6.8

* Bump after public release

* Bump version, added changelog
2023-08-18 20:18:05 +03:00
Oleg A
bc0932a745
Support wider pydantic version (#1273)
* chore: make pydantic version wider

* fix: > instead ^

* chore: pydantic till v3
2023-08-18 16:51:41 +03:00
Oleg A
5a14098803
Add contributing support for zsh and win (#1272)
* fix: add support for zsh and win

* docs: add both install commands (win,lin,mac)

* fix: some typos

* docs: update win cmd examples
2023-08-18 12:06:13 +03:00
Alex Root Junior
5b17bd4393
Added CLI as extra dependency 2023-08-16 22:00:11 +03:00
Alex Root Junior
d0d0ff1be0
Update a warning message in dispatcher (#1269)
* Update a warning message in dispatcher

Enhanced the warning message in aiogram/dispatcher/dispatcher.py to include a JSON dump of the update. This change helps to give clearer and more detailed information on why an update type is unknown by including the specifics of what the update contains.

* Added changelog
2023-08-16 20:43:18 +03:00
nullmatawasoradesu
2093b45799
Fixed some typos in documentation (#1268)
* Fixed typo in i18n documentation

* Removed extra param in docstring of TelegramEventObserver's filter method

* Added changelog
2023-08-16 17:23:10 +03:00
Danipulok
16649ec896
Add error handling example (#1099)
* Add error handling example

* Add `ExceptionMessageFilter` usage

* Add `CHANGES`

* Update CHANGES/1099.doc.rst

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2023-08-14 23:43:44 +03:00
Alex Root Junior
8ff992bf1d
Content from global filters (#1267)
* Move global filters check placement into router to add chance to pass context from global filters into handlers in the same way as it possible in other places

* Added changelog
2023-08-14 22:18:11 +03:00
Alex Root Junior
577b44cdc1
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2023-08-14 01:34:30 +03:00
Alex Root Junior
3facba2730
Remove bad file 2023-08-14 01:34:24 +03:00
nullmatawasoradesu
0cec7d4933
Migration FAQ supplement (Finite State Machine) (#1264)
* Updated Migration FAQ > Finite State Machine

* Fixed typos, added changelog

* Fixed typo x2
2023-08-13 22:41:56 +03:00
Alex Root Junior
ac124f5b08
Fixed structure of DI docs page, included it in toctree 2023-08-13 22:14:33 +03:00
Forden
4d12e073ee
Fix missing message content types (#1252)
* Fix missing message content types

* Added changelog

* Fix black

* Update CHANGES/1252.bugfix.rst

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>

* add tests

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2023-08-13 18:05:04 +03:00
Kostiantyn Kriuchkov
fac0a533b0
Examples/dev 3x multi file (#1254)
* Add multi-file bot example

This commit adds a multi-file bot example to the repository. .

* Refactor: Clean up code formatting for consistency

* add Changelog

* Refactor bot code, fix changelog version
2023-08-13 18:00:59 +03:00
nullmatawasoradesu
f87deea4fb
Added a section on Dependency Injection technology in documentation (#1253)
* Added a section on Dependency Injection technology in documentation

* Added changelog

* Edited comments & titles
2023-08-13 17:59:38 +03:00
Kostiantyn Kriuchkov
068875534b
Examples/dev 3x refactor fix* (#1261)
* Refactor and improve bot messages

Refactored bot code to use aiogram enumerations and enhanced chat messages with markdown beautifications for a more user-friendly display.

CommandStart() is now used instead of Command('start') for readability.

Furthermore, the bot's 'stop' command was improved, ensuring it executes appropriately during KeyboardInterrupt or SystemExit.

Additionally, the bot's logging was adjusted to output to sys.stdout for better logs' readability.

* Added Changelog

* Add guidance comments on obtaining bot tokens from environment variables

* Remove hardcoded tokens, opt for environment variable

* Remove unnecessary spaces and reorganize imports

* Fix error, switch default storage from Redis to Memory, and add logging to multibot example

* fix changelog version

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2023-08-13 17:56:32 +03:00
Alex Root Junior
a80031509e
Fixed nested hashtag, cashtag and email entnties parsing (#1263)
* Fixed nested hashtag, cashtag and email message entities not being parsed correctly when these entities are inside another entity.

* Tests coverage
2023-08-13 17:55:35 +03:00
Alex Root Junior
020db29e6d
Fixed line length 2023-08-13 17:01:21 +03:00
Kostiantyn Kriuchkov
c516ea9d6a
Refactor and improve bot examples (#1256)
* Refactor and improve bot messages

Refactored bot code to use aiogram enumerations and enhanced chat messages with markdown beautifications for a more user-friendly display.

CommandStart() is now used instead of Command('start') for readability.

Furthermore, the bot's 'stop' command was improved, ensuring it executes appropriately during KeyboardInterrupt or SystemExit.

Additionally, the bot's logging was adjusted to output to sys.stdout for better logs' readability.

* Added Changelog

* Add guidance comments on obtaining bot tokens from environment variables

* Remove hardcoded tokens, opt for environment variable

* Remove unnecessary spaces and reorganize imports

* Fix error, switch default storage from Redis to Memory, and add logging to multibot example
2023-08-10 22:10:30 +03:00
Alex Root Junior
68c0516f69
Small update in issues templates 2023-08-08 00:05:39 +03:00
Alex Root Junior
7adc39bd82
Backport issue templates 2023-08-07 23:59:17 +03:00
Alex Root Junior
56e969660e
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2023-08-07 23:57:11 +03:00
Alex Root Junior
b9abf701a0
Fixed typo in changelog 2023-08-07 23:57:04 +03:00
nullmatawasoradesu
6d6bcd0a9b
Added a few words about skipping pending updates (#1251)
* Added a few words about skipping pending updates

* Added changelog

* Fixed typo
2023-08-07 23:54:05 +03:00
Alex Root Junior
4e7c66726f
Bump version 2023-08-07 23:53:40 +03:00
Alex Root Junior
73033643e7
Update main page 2023-08-06 20:21:09 +03:00
Alex Root Junior
649f76b5f6
Bump changelog 2023-08-06 19:31:10 +03:00
Alex Root Junior
f54ed1326b
Fixed typo 2023-08-06 19:31:08 +03:00
Alex Root Junior
c9f0b36ad6
Added support for message_thread_id in ChatActionSender (#1250)
* Add support for message_thread_id in ChatActionSender

The given changes add support for including the 'message_thread_id' in ChatActionSender function calls, allowing actions to be sent in specific threads rather than the main chat.

* Added changelog
2023-08-06 19:17:58 +03:00
Alex Root Junior
b311d59fce
Webhook docs (#1248)
* Added documentation for polling/webhook modes

* Added changelog

* Added changelog
2023-08-06 16:59:29 +03:00
Alex Root Junior
62d4b9014c
Fix bot instance passing in Dispatcher startup (#1247)
Modified the Dispatcher to remove the "bot" key from workflow_data if found, prior to emitting startup in order to allow manual addition of "bot" to workflow data. This change was necessary as a bot instance is required to start polling, and therefore must be passed correctly. This logic is now tested in the 'test_start_polling' function. The change also includes an update to the changelog.
2023-08-06 01:14:26 +03:00
Alex Root Junior
90654ac0fa
Enhance keyboard utility, improved documentation page. (#1236)
* Enhance keyboard utility, improved documentation for this utility.

Updated the 'aiogram/utils/keyboard.py' file with new methods for integrating buttons and keyboard creation more seamlessly. Added functionality to create buttons from existing markup and attach another builder. This improvement aims to make the keyboard building process more user-friendly and flexible.

* Added changelog

* Cover by tests
2023-08-04 22:36:50 +03:00
Alex Root Junior
11dc7eaa31
Added typehints for init methods of types and methods (#1245)
* Generate init

* Fixed mypy errors

* Bump butcher

* Added changelog
2023-08-04 00:30:27 +03:00
Alex Root Junior
aea876dfe0
Added codegen configuration for lost shortcuts (#1244)
* Added codegen configuration for lost shortcuts

* Rollback inline_message_id

* Added changelog
2023-08-02 23:28:50 +03:00
Yarik
d3bec413db
Add currency enum (#1194)
* Add currency enum

* Add change log

* Add butcher file

* Apply enum
2023-08-02 21:44:49 +03:00
Alex Root Junior
a7916c1103
Reworked InputFile sending (#1238)
* Reworked InputFile sending

* Added changelog
2023-08-02 21:41:07 +03:00
Alex Root Junior
c7b7714959
Bump version 2023-08-02 21:32:15 +03:00
Alex Root Junior
53e5abbdee
Bump changelog 2023-07-30 20:51:29 +03:00
Alex Root Junior
2691b2ac96
Small texts update 2023-07-30 18:35:38 +03:00
Alex Root Junior
54134c68fe
Bump texts translation files 2023-07-30 18:32:37 +03:00
Alex Root Junior
faadc80460
Chat join request shortcuts (#1235)
* Add additional API message methods to ChatJoinRequest class

ChatJoinRequest now includes additional message methods including SendAnimation, SendAudio, SendContact, and many more. The changes are useful for sending various types of messages during chat join requests.

* Added changelog
2023-07-30 18:12:06 +03:00
Alex Root Junior
a1513ddb2d
Added shortcuts for ChatMemberUpdate event (#1234)
* Added shortcuts for ChatMemberUpdate event

* Added changelog
2023-07-30 17:29:45 +03:00
Alex Root Junior
baad0ebef2
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2023-07-30 00:07:47 +03:00
Alex Root Junior
72ff444a2c
Update a migration guide 2023-07-30 00:07:42 +03:00
Alex Root Junior
98780dfb49
Added model validation to remove UNSET before field validation (#1233)
* Add model validation to remove UNSET before field validation

Updated aiogram/types/base.py to include a model validator which removes any 'UNSET' before field validation. This change was necessary to correctly handle `parse_mode` where 'UNSET' is used as a sentinel value. Without the removal of 'UNSET', it would create issues when passed to model initialization from `Bot.method_name`. 'UNSET' was also added to typing. Tiny documentation fix was made.

* Added changelog
2023-07-30 00:01:23 +03:00
Alex Root Junior
42570fb747
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2023-07-29 23:06:59 +03:00
Alex Root Junior
98a03faf77
Added a few words about throttling 2023-07-29 23:06:37 +03:00
Alex Root Junior
8ad0a1efb7
Ensure all message types are assigned to the correct bot. (#1232)
* Ensure all message types are assigned to the correct bot.

* Added changelog
2023-07-29 22:59:43 +03:00
Alex Root Junior
56f0d9d220
Migration guide 2.x -> 3.0 (#1143)
* Initial commit for docs cleanup

* Update migration guide

* More docs

* Added changes description

* Small fixes
2023-07-29 22:36:12 +03:00
Alex Root Junior
2ecf9cefd7
Removed the use of the context instance (Bot.get_current) from all placements that were used previously. (#1230)
* Removed the use of the context instance (Bot.get_current) from all placements that were used previously.

* Fixed tests

* Added changelog

* Change category
2023-07-28 22:23:32 +03:00
Alex Root Junior
479e302cba
Bump dependencies and own version 2023-07-28 21:54:09 +03:00
Alex Root Junior
27f48c60de
Disable hatch bump 2023-07-17 23:07:21 +03:00
Alex Root Junior
ea0ecbcd50
Render changelog 2023-07-17 23:02:10 +03:00
Alex Root Junior
71e7e62e36
Update publish pipeline 2023-07-17 22:57:31 +03:00
Alex Root Junior
fcf9454e13
Merge branch 'Latand/dev-3.x' into dev-3.x 2023-07-17 03:11:32 +03:00
Alex Root Junior
5236329521
Update hints 2023-07-17 03:09:36 +03:00
Alex Root Junior
6044a73e55
Small changes in the changelog 2023-07-17 02:56:35 +03:00
Alex Root Junior
c9d5b37d5c
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2023-07-17 02:49:34 +03:00
Alex Root Junior
ac27b99751
Bump API version 2023-07-17 02:49:29 +03:00
Alex Root Junior
710c7669c4
Bump magic-filter to 1.0.10 (#1221)
* Bump magic-filter to 1.0.10

* Added changelog

* Fixed compatibility
2023-07-17 02:48:27 +03:00
SM CheeseNick
7f472eff42
Update dispatcher.py (#1220)
In line 469 corrected a typo in the word "more" (was "mre")
2023-07-17 00:28:30 +03:00
Alex Root Junior
21351de335
Fixed #1217: Fixed union subtypes generation inside arrays of elements 2023-07-17 00:10:47 +03:00
Alex Root Junior
0ed62bcadf
Removed pydantic base fields from docs 2023-07-16 23:16:43 +03:00
Alex Root Junior
853b72f38d
Added possibility to use HashTag/CashTag elements without prefixing content, added sep: str argument to the as_line function. 2023-07-16 23:04:06 +03:00
Alex Root Junior
afeb659b82
Added test that prove previous fix 2023-07-16 22:49:18 +03:00
Alex Root Junior
74e00a30b1
"Add get_mounted_bot function and improve model comparison in tests"
In this commit, a new function `get_mounted_bot` was added to `context_controller.py` that returns the bot mounted in context. This function was needed to bypass the limitation in pydantic BaseModel's properties, which neither support computed fields nor serialization/validation.

Various tests were also updated to compare models using `model_dump_json()` method rather than comparing the models directly. This change provides more accurate comparisons by considering default values in the models.

Further, the dispatcher was adjusted to enforce update re-mounting if the mounted bot differs from the current update. This allows shortcuts to be used in the bot's current instance and ensures the correct propagation of the context to all the nested objects and attributes of Updates.
2023-07-16 22:46:45 +03:00
Alex Root Junior
31c11c31e0
Fixed subtypes and union types generation, new enums added (#1213)
* Fixed subtypes and union types generation, new enums added

* Added changes description
2023-07-11 23:39:54 +03:00
Alex Root Junior
a7b92bb050
PoC: Bot instance inside method shortcuts using pydantic Validation Context (#1210)
* PoC: Mount objects to the Bot instance, bind shortcuts to configured instance

* Fixe docstring of the bind method

* Pass Bot instance explicitly to the URLInputFile

* Added tests

* Added changelog

* Refactor aiogram client and update tests

Refactored base.py to improve code readability by separating response_type operation from model_validate(). Also, adjusted the parameters in URLInputFile() within test_input_file.py for better test coverage. Updated input_file.py to streamline read method and avoid unnecessary instantiation of Bot class. Lastly, adjusted typing in methods/base.py to enhance code clarity.

* Update changelog
2023-07-11 23:17:26 +03:00
Alex Root Junior
c39a803747
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2023-07-04 00:39:15 +03:00
Alex Root Junior
2a143edf56
Hide pydantic service attributes from models 2023-07-04 00:39:02 +03:00
Alex Root Junior
333f376ad1
Fixed pydantic deprecation warnings 2023-07-04 00:33:57 +03:00
Andrey
3e3e8d3961
Remove patreon from contributing.rst (#1204) 2023-07-03 21:43:22 +03:00
Alex Root Junior
298b4f0e0d
Update texts 2023-07-02 15:12:42 +03:00
Alex Root Junior
461e59bbdd
Update pydantic to V2 (#1202)
* Update pydantic, fix errors and warnings (all?)

* Fixed typehints

* Reformat code, removed unused imports

* Fixed typing extensions version compatibility

* Fixed coverage

* Describe changes

* Regen code
2023-07-02 15:07:19 +03:00
Alex Root Junior
066d16b522
#1186 Renamed USER_IN_THREAD to USER_IN_TOPIC 2023-07-01 21:53:34 +03:00
Alex Root Junior
d29b18da8c
#1191 Added possibility to pass custom headers to URLInputFile object (#1197) 2023-06-25 01:39:26 +03:00
Alex Root Junior
484a61bdc1
Fixed workflow data propagation (#1196)
* Coverage

* Added changelog
2023-06-25 01:11:00 +03:00
sheldy
a890622e40
parameter secret_token (#1173)
* Added secret token validation
2023-06-25 00:40:04 +03:00
Alex Root Junior
5b20f81654
Formatting tools (#1172)
* Added base implementation of formatting utility

* Refactored and added docs

* Added changelog

* Coverage
2023-06-10 20:47:45 +03:00
latand
af4b9cc415 fix typing 2023-06-02 11:12:34 +03:00
latand
caba07a529 update changelog 2023-06-02 10:17:39 +03:00
latand
1abbf9a218 fix typehint 2023-06-02 10:15:20 +03:00
latan
6a3df4d6f3 removed auto_resolve_update_types from run_polling 2023-06-01 22:53:16 +03:00
latan
ce444a9044 change the default value for allowed updates to UNSET TYPE 2023-06-01 22:51:55 +03:00
latan
a5ffa37b69 make resolving update types by default in dispatcher.py 2023-06-01 22:49:04 +03:00
latan
e955d7cb3b add towncrier file for a feature 2023-05-23 13:24:29 +03:00
latan
b0386c9250 Add auto_resolve_update_types argument to start_polling method. 2023-05-23 13:09:33 +03:00
Nikita
c418689dc1
Fix markdown spoiler (#1176)
* Fix spoiler

* added a explanation

* Updated the TestTextDecoration.test_apply_single_entity

---------

Co-authored-by: = <=>
2023-05-13 14:10:15 +03:00
Alex Root Junior
68a6c2c192
Removed patreon, because it supports russian terrorists 2023-05-07 20:03:07 +03:00
Alex Root Junior
cf269e15f4
Added create_channel_bot_link function 2023-04-23 03:30:48 +03:00
Alex Root Junior
62a9f0cb6e
Removed Text filter (#1170)
* Removed Text filter

* Added changelog

* Clean docs

* Fixed pytz
2023-04-22 20:21:17 +03:00
Alex Root Junior
dad3cdc409
Fixed mypy 2023-04-22 19:54:56 +03:00
Alex Root Junior
c9a8dad5ee
Update dependencies 2023-04-22 19:48:04 +03:00
Alex Root Junior
942ba0d520
Forum topic in FSM (#1161)
* Base implementation

* Added tests, fixed arguments priority

* Use `Optional[X]` instead of `X | None`

* Added changelog

* Added tests
2023-04-22 19:35:41 +03:00
Alex Root Junior
1538bc2e2d
Bot API 6.7 (#1168)
* Added 6.7 features

* Update after release

* Added tests

* Added changelog
2023-04-22 18:09:59 +03:00
Alex Root Junior
aad2de4324
Improve callback data serialization (#1163)
* Improve callback data serialization

* Added tests and changelog
2023-04-21 00:17:28 +03:00
Alex Root Junior
fb3076d40f
Fix compatibility with Python 3.8-3.9 (#1162)
* Try to fix compatibility with Python 3.8-3.9

* Added changelog
2023-04-21 00:17:06 +03:00
Alex Root Junior
399ccb2b00
Update butcher 2023-04-20 23:44:52 +03:00
Andrey
2dd019d486
Fix typo (#1164) 2023-04-17 00:31:33 +03:00
Aleksandr
8d2bf20fb8
Added missing FORUM_TOPIC_EDITED value to content_type property (#1160)
* Added missing FORUM_TOPIC_EDITED value to content_type property

* Added changelog to CHANGES

* Fixed aiogram/filters/magic_data.py:21:41: C416 Unnecessary `dict` comprehension (rewrite using `dict()`)

* Resolve  #1155: Different signature of startup/shutdown events on polling and webhooks  (#1156)

* Code refactor
- Use 'or' istead of 'A if A else B'
- Raise new error from catched error: raise Error from e

* Fixed signature of startup/shutdown events
- Include the **dispatcher.workflow_data as the handler arguments

* Update deep_linking basic examples (#1151)

* skip if current router does not have observer for custom event (#1147)

* skip if current router does not have observer for custom event

* Test custom event in router

* Feature changelog file

* fix style

* Change `InlineQueryResultType.MPEG` to more correct (#1146)

* Change `InlineQueryResultType.MPEG` to `InlineQueryResultType.MPEG4GIF`

* Change regexp for parse entities

* Use code generator to fix types

* Add changelog

* fix(docs): fix wrong page link in docs (#1154)

* storage cleanup (#1144)

* storage cleanup

* storage cleanup

* Update API docs

* Added tests

* Fix tests

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
Co-authored-by: Łukasz Tshipenchko <dev@zxc.sx>
Co-authored-by: Max Kotsiuruba <81016938+A5KET@users.noreply.github.com>
Co-authored-by: Andrey Tikhonov <andrey.tikhonov@quantori.com>
Co-authored-by: Desiders <47452083+Desiders@users.noreply.github.com>
Co-authored-by: Daniil <hum4noid@yandex.ru>
Co-authored-by: RootShinobi <111008396+RootShinobi@users.noreply.github.com>
2023-04-16 22:41:49 +03:00
Alex Root Junior
d15502c2af
Fixed contributing URL 2023-04-13 00:02:15 +03:00
Alex Root Junior
2c756a1689
Update API docs 2023-04-08 18:31:38 +03:00
RootShinobi
dbaf6fabcb
storage cleanup (#1144)
* storage cleanup

* storage cleanup
2023-04-08 18:01:11 +03:00
Daniil
d8a977f357
fix(docs): fix wrong page link in docs (#1154) 2023-04-08 17:54:08 +03:00
Desiders
46a7beb668
Change InlineQueryResultType.MPEG to more correct (#1146)
* Change `InlineQueryResultType.MPEG` to `InlineQueryResultType.MPEG4GIF`

* Change regexp for parse entities

* Use code generator to fix types

* Add changelog
2023-04-08 17:41:00 +03:00
Andrey Tikhonov
268b7e759d
skip if current router does not have observer for custom event (#1147)
* skip if current router does not have observer for custom event

* Test custom event in router

* Feature changelog file

* fix style
2023-04-08 17:39:48 +03:00
Max Kotsiuruba
99cf7028ec
Update deep_linking basic examples (#1151) 2023-04-08 17:38:56 +03:00
Łukasz Tshipenchko
6efef7137c
Resolve #1155: Different signature of startup/shutdown events on polling and webhooks (#1156)
* Code refactor
- Use 'or' istead of 'A if A else B'
- Raise new error from catched error: raise Error from e

* Fixed signature of startup/shutdown events
- Include the **dispatcher.workflow_data as the handler arguments
2023-04-08 17:38:11 +03:00
Alex Root Junior
5a99b78292
Fixed aiogram/filters/magic_data.py:21:41: C416 Unnecessary dict comprehension (rewrite using dict()) 2023-04-08 17:31:15 +03:00
Alex Root Junior
fea1b7b0a3
Reworked request builder (#1142)
* Reworked request builder

* Added more default values

* Update tests

* Fixed timestamp

* Fixed Py3.8 support

* Describe changes
2023-03-11 20:46:36 +02:00
Alex Root Junior
924a83966d
Update butcher - Added deprecation mechanism to schema and codegen 2023-03-11 17:43:01 +02:00
Alex Root Junior
f6020476e6
Update schema 2023-03-11 17:43:01 +02:00
Alex Root Junior
6570d0bab1
Bot API 6.6 (#1139)
* Added basic support of Bot API 6.6

* Update descriptions

* Added StickerFormat enum

* Bump version

* Refresh from docs

* Fixed CommandStart

* Fixed files uploading

* Cover new functionality

* Added changelog

* Update texts
2023-03-11 02:17:47 +02:00
Evgenii Petrovich
5adaf7a567
Update upload_file.rst | tiny grammar typos (#1133)
* Update upload_file.rst

small grammar typos

* changelog
2023-02-25 17:51:54 +02:00
Alex Root Junior
1098ac547b
Prettify disclaimer 2023-02-19 19:13:30 +02:00
Alex Root Junior
eb7a9f5cc8
Change version number in disclaimer 2023-02-19 18:24:15 +02:00
Alex Root Junior
295fae6905
Reformat disclaimer in changelog 2023-02-19 18:20:10 +02:00
Alex Root Junior
46218b8696
Towncrier build 2023-02-19 18:10:11 +02:00
Alex Root Junior
7efec4a5df
Towncrier build 2023-02-18 15:54:31 +02:00
Alex Root Junior
753954adb0
Update changelog 2023-02-18 15:52:39 +02:00
Alex Root Junior
d0b7135ca6
Reworked graceful shutdown (#1124)
* Reworked graceful shutdown

* Remove special errors from polling process

* Update dependencies

* Coverage

* Added changelog
2023-02-18 15:46:28 +02:00
Alex Root Junior
a332e88bc3
Fixed lines in FSM example 2023-02-13 00:55:53 +02:00
imsLmaooo
dc7c99763e
update ua docs: patch api/enums/*.po (#1126) 2023-02-12 22:05:17 +02:00
imsLmaooo
157df969d3
UA translation of chat_action.po from Bot Api (#1123)
* Update Ukrainian docs localization

* Update Ukrainian docs localization
2023-02-12 14:02:40 +02:00
Alex Root Junior
dc88a8c903
Removeseparators in readme 2023-02-12 03:19:31 +02:00
Alex Root Junior
2bec079158
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2023-02-12 03:19:01 +02:00
Alex Root Junior
0cec389a32
Update badges 2023-02-12 03:18:53 +02:00
Dmitry Anfimov
184ee1fbf8
[3.x] Check status code when downloading file (#1079)
* Check status code when downloading file and raise an error if someting bad happends

* Style fixes

* Add doc

* Use "towncrier create <issue>.<type>" for creating file
2023-02-12 02:56:11 +02:00
Alex Root Junior
94e11ce8e9
Small typo fix 2023-02-12 02:02:42 +02:00
Alex Root Junior
58868ec627
Added possibility to reply into webhook with files (#1120) 2023-02-12 02:00:42 +02:00
Alex Root Junior
84bc0e347b
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2023-02-12 01:27:39 +02:00
sheldy
bac90c8fa7
add new method for Router (#1117)
* add new method for Router

* add type hint, tests, changes file

* update tests

* Update aiogram/dispatcher/router.py

* Update tests/test_dispatcher/test_router.py

* Update router.py

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2023-02-12 01:26:49 +02:00
Alex Root Junior
56097d6b53
Bump dependencies 2023-02-12 01:24:18 +02:00
Alex Root Junior
e8d279c8f2
Bump API version 2023-02-07 22:42:57 +02:00
Alex Root Junior
021ae5626f
Replaced error TypeError: TelegramEventObserver.__call__() got an unexpected keyword argument '<name>' with a more understandable (#1114)
* Explain why keyword filters is not supported

* Added changelog
2023-02-05 16:13:06 +02:00
Alex Root Junior
d07e8fc407
Extended logic filter arguments 2023-02-04 20:14:15 +02:00
Alex Root Junior
f704922fe2
Update changelog 2023-02-04 20:09:51 +02:00
Alex Root Junior
8a9cabb3df
Update codecov action 2023-02-04 19:57:48 +02:00
Alex Root Junior
e59d4652bf
Added full support of Bot API 6.5 (#1112)
* Added full support of Bot API 6.5

* Shut up, linters (Fixed errors)

* Oops. Added lost files.

* Fixed tests

* Added changes description

* Update description from docs

* Fixed anchors

* Update Butcher

* Added danger zone to changelog

* Type
2023-02-04 19:53:32 +02:00
Alex
3428924d63
ignore_case fix for aiogram.filters.command.Command() (#1107)
* ignore_case fix

* Create 1106.bugfix.rst

* better fix, added tests

* Update 1106.bugfix.rst

* fix, attempt to satisfy the linter

* not on purpose, single quotes in tests
2023-02-04 19:52:36 +02:00
Alex Root Junior
fad45c66aa
Update .readthedocs.yml
3.10 was missing at ReadTheDocs
2023-01-12 11:55:43 +02:00
Alex Root Junior
f4ce4431f9
Migrate to hatchling (#1095)
* Migrate to hatchling instead of poetry, ruff instead of flake8

* Migrate to hatchling instead of poetry, ruff instead of flake8

* Update tests suite

* venv?

* -m venv?

* Change dependencies

* Remove venv

* Change mypy config

* Added changelog

* Mark uvloop incompatible with pypy

* Update release script

* Use internal caching for dependencies

* Re-disable cov branches

* Added contributing guide
2023-01-12 02:49:58 +02:00
Alex Root Junior
04ccb390d5
Callback answer feature (#1091)
* Added callback answer feature

* Fixed typehints and tests

* Make context manager in tests compatible with Python 3.8
2023-01-08 16:49:34 +02:00
Alex Root Junior
2e59adefe6
Update docs 2023-01-07 23:52:33 +02:00
Alex Root Junior
d5f3e30215
Clean bot class & texts 2023-01-07 23:25:30 +02:00
Alex Root Junior
ea0987e7d9
Added lost text files 2023-01-07 22:42:01 +02:00
Alex Root Junior
c5f3569471
Update from API docs 2023-01-07 22:41:36 +02:00
Alex Root Junior
d8e943424a
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2023-01-07 22:36:09 +02:00
Alex Root Junior
730485e43a
Added full support of Bot API 6.4 (#1088)
* Remove warnings about pytest asyncio mode

* Update Bot API to 6.4

* Bump version

* Added changelog

* Update translations
2022-12-30 22:44:25 +02:00
Alex Root Junior
da0fb50e39
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2022-12-30 22:07:19 +02:00
Alex Root Junior
655b3a2d48
Remove warnings about pytest asyncio mode 2022-12-30 16:10:06 +02:00
Daria
b93b75804c
UA translation of index.po, download_file.po & upload_file.po from Bot API (#1080) 2022-12-15 21:34:46 +02:00
Daria
49f4c9d3bd
UA translation of class based handlers docs (#1076) 2022-12-15 21:34:36 +02:00
Daria
a0dbbcfd5d
UA translation of router & dispatcher docs 2022-12-10 21:13:28 +02:00
Alex Root Junior
4497b62910
Added lost files 2022-12-10 21:10:16 +02:00
Alex Root Junior
3ea73fbbbd
Add missing shortcuts, new enums, reworked old stuff (#1070)
* Render shortcuts

* Render docs

* Added enumerations

* Added docs

* Use enums, removed Helper

* Bump butcher

* Added InputMediaType enum

* Added MaskPositionPoint, InlineQueryResultType enums

* Update texts

* Added StickerType enum

* Cover tests

* Update docs

* Fixed imports

* Re-enabled all pre-commit hooks
2022-12-04 03:05:49 +02:00
Alex Root Junior
3438d2446d
Bump butcher 2022-11-21 01:12:50 +02:00
Alex Root Junior
d034c1ba9f
Adding new code-generator (Butcher) (#1069)
* Re-generate types

* Re-generate methods (only attributes)

* Added enums

* Base init generator

* Added butcher configs

* Fixed tests, bump butcher

* Added changelog

* Added enum docs

* Added templates for docs index

* Re-generate bot class, remove deprecated methods
2022-11-21 01:06:55 +02:00
Alex Root Junior
c7779abc50
Bump version 2022-11-19 20:32:36 +02:00
Alex Root Junior
780a3d80fd
Hide empty changelog from docs 2022-11-18 12:45:59 +02:00
Alex Root Junior
6494c3bfbc
Release 3.0.0-beta.6 2022-11-18 11:42:47 +02:00
Alex Root Junior
c1f4453070
Added TEST server endpoint 2022-11-18 11:27:21 +02:00
Alex Root Junior
37742a4f15
Added certifi (#1066)
* Added certifi

* Added changelog
2022-11-13 00:43:31 +02:00
KatantDev
0294bf2853
Fix for copy and forwarding in special topic (#1064)
* Fix for copy and forwarding in special topic

* Added changelog

Co-authored-by: katant <katantdev@mail.ru>
2022-11-08 00:06:57 +02:00
Alex Root Junior
34a91bfb69
Update docs config, fixed towncrier draft properties 2022-11-07 06:41:37 +02:00
Alex Root Junior
dedeff88ce
Added sphinxcontrib-towncrier integration 2022-11-07 06:35:55 +02:00
Desiders
08d35ed2b3
Removed an old now non-working feature from documentation (#1060)
* Removed an old now non-working feature

* Create 1060.doc.rst

* Removed unused `typing.Union`
2022-11-06 14:33:48 +02:00
Alex Root Junior
b287551590
Bot API 6.3 (#1063)
* Added API changes

* Added changelog

* Oops. Move changelog

* Update tests

* Remove experimental

* Added message content type

* Update message aliases

* Update changes

* Update texts

* Bump version

* Remove versionadded badge
2022-11-06 14:28:21 +02:00
Alex Root Junior
3ae5d904c9
Update texts 2022-11-02 22:46:44 +02:00
sheldy
b8cd06fd6f
add method for get user mention (#1049)
* add new method

* Create 1049.feature.rst

* update test_user

* after black and isort using

* after black and isort using

* adding new tests

* fix test

* update tests

* update test

* using create_tg_link function instead of new func

* Update user.py

* Update aiogram/types/user.py

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2022-11-02 22:40:19 +02:00
Alexander
45705faf12
Update redis.py (#1053)
I fixed a mistake in writing documentation in class RedisStorage

from/to:
aioredis -> redis
pip install aioredis -> pip install redis
2022-11-02 22:39:38 +02:00
v9lu
67fbee454a
Updated: message.py (#1047)
* Updated: message.py

-Fixed reply_invoice
-Fixed answer_invoice

* Updated: message.py

-Fixed reply_invoice
-Fixed answer_invoice

* Updated: message.py

-Fixed reply_invoice
-Fixed answer_invoice

* Create 1047.bugfix.rst

* Deleted aiogram/message.py

* Update CHANGES/1047.bugfix.rst

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2022-10-30 14:28:52 +02:00
Alex Root Junior
93f24e882d
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x 2022-10-26 22:22:56 +03:00
Alex Root Junior
958ffbc354
Added Python 3.11 package badge 2022-10-26 22:22:44 +03:00
Alex Root Junior
6db3778c6f
Tests on Python 3.11 (#1044)
* Try to use Python 3.11

* Remove `asynctest` dependency

* Fixed aiofiles tests

* Added changelog
2022-10-26 22:21:04 +03:00
Alex Root Junior
c7a85de579
Update pre-commit, disable poetry update on commit 2022-10-25 22:43:00 +03:00
Daria
1e60e10997
UA translation of filtering events docs (#1043)
* UA translation of filtering events docs

* Small changes in description

* Remove unused text

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2022-10-25 22:24:06 +03:00
Alex Root Junior
5c3f442866
Reformat code 2022-10-22 01:02:56 +03:00
Danipulok
8b0ca520f3
Add missing Message methods (#1030)
* Add `Message.forward` method

* Add docs

* Add other methods

* Fix

* Add changes

* Fix lints

* Update CHANGES/1030.feature.rst

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2022-10-22 00:29:29 +03:00
Danipulok
f4d3dbf3bf
Fix typehints for Message media group methods (#1029)
* Fix typehints for `Message` media group methods

* Create 1029.doc.rst

* Fix importes
2022-10-21 22:23:58 +03:00
Daria
dea1623435
UA translation of FSM & Middlewares docs (#1035) 2022-10-21 22:21:46 +03:00
Daria
9c4f60fb1b
UA translation of Observer docs (#1034) 2022-10-19 23:19:40 +03:00
Alex Root Junior
01028f10eb
Small fix in translated pages 2022-10-18 02:12:24 +03:00
dimaluts
6e31f93951
Translate flags docs page to uk_UA (#1025)
* Translate flags docs page to uk_UA
2022-10-15 01:06:35 +03:00
Alex Root Junior
41c802010d
Small fix in translated pages 2022-10-15 00:46:53 +03:00
Alex Root Junior
048172bcc2
Translate utils docs // uk_UA // TY @MelissaLemon 2022-10-14 19:46:19 +03:00
Daniil
7a618b41f9
Update router.rst (#1023)
Fix typo error in docs
2022-10-11 20:04:28 +03:00
Alex Root Junior
2429e4a1ac
Fixed keyboard builder button typehint 2022-10-10 13:30:06 +03:00
Alex Root Junior
b0f251a8b8
Combining filters (again) (#1018)
* Added explicit logic filters, added slots to all other filters

* Update translation files

* Update docs
2022-10-03 01:23:22 +03:00
Andrew
1a3e2a8991
Fix UA translations in index.po (#1017)
* Fix ua translations in index.po
Пофікшені і додані деякі переклади

* ADD Changelog
2022-10-03 01:05:55 +03:00
Alex Root Junior
9041cc72f1
Fixed readme :ref: tag 2022-10-02 19:42:33 +03:00
Alex Root Junior
49372d14fd
Forget about virtualenv in pipeline 2022-10-02 19:38:26 +03:00
Alex Root Junior
1fa7fae6b3
Fixed deployment pipeline (Python version) 2022-10-02 19:33:17 +03:00
Alex Root Junior
f90c955b15
Generate changelog 2022-10-02 19:30:46 +03:00
Alex Root Junior
efae83d337
Added more details when server send invalid response 2022-10-02 19:22:12 +03:00
Alex Root Junior
44ae565149
Change changelog categories, update dependencies 2022-10-02 18:24:26 +03:00
Alex Root Junior
d824155a66
Added links to docs 2022-10-02 00:49:27 +03:00
Alex Root Junior
32a6589daf
Downgrade Python for docs 2022-10-02 00:33:24 +03:00
Alex Root Junior
d988d3e0f2
Maybe this? 2022-10-02 00:31:27 +03:00
Alex Root Junior
a07e23804a
Update RTD build 2022-10-02 00:28:50 +03:00
Alex Root Junior
5a9ea04efc
Fixed escaping markdown in aiogram.utils.markdown module 2022-10-02 00:09:28 +03:00
Alex Root Junior
f4251382e8
Remove filters factory, introduce docs translation (#978)
* Rewrite filters

* Update README.rst

* Fixed tests

* Small optimization of the Text filter (TY to @bomzheg)

* Remove dataclass slots argument in due to the only Python 3.10 has an slots argument

* Fixed mypy

* Update tests

* Disable Python 3.11

* Fixed #1013: Empty mention should be None instead of empty string.

* Added #990 to the changelog

* Added #942 to the changelog

* Fixed coverage

* Update poetry and dependencies

* Fixed mypy

* Remove deprecated code

* Added more tests, update pyproject.toml

* Partial update docs

* Added initial Docs translation files

* Added more changes

* Added log message when connection is established in polling process

* Fixed action

* Disable lint for PyPy

* Added changelog for docs translation
2022-10-02 00:04:31 +03:00
Oleg A
94030903ec
Fix chat type example (#999) 2022-09-18 17:08:45 +03:00
Oleg A
a08c2e750c
Add representation for aiogram exception (#989)
* feat: add repr for aiogram exception

#988

* docs: add changelog

#988

* tests: add representation coverage

#988

* fix: correct test result type

#988
2022-09-11 23:16:47 +03:00
Alex Root Junior
0b5f4d62c7
Prevent to crash polling (#995)
* Prevent to crash polling

* Added changelog
2022-08-30 01:46:19 +03:00
Evgen Fil
40c29a0494
PyPy support (#985)
* Run tests on PyPy (#984)

Remove unnecessary `jobs.build.strategy.max_parallel` attribute

* Workaround `symlink() is not implemented for PyPy on Windows`

* Quote conditions in tests workflow file

* Fix quoting in Poetry installation script

* Adjust timeout when testing on pypy

Running the tests with coverage pytest plugin makes some tests run slower than expected

* Try to fix uvloop build errors on macos-latest

* Try to fix uvloop build errors on macos-latest (2)

* Adjust timeout when testing on pypy (2)

* Increase timeout even more

* Try to fix uvloop build errors on macos-latest (3)

* Update tests.yml, revert changes in test files

Add and improve step names
Merge "Lint code" and "Check code-style" steps
Don't install uvloop on macos when running on pypy
Don't run tests with coverage on pypy
Remove test timeout adjustments

* Fix condition

* Update README, add changelog

* Put environment info (`IS_PYPY`, `IS_WINDOWS`) into environment variables

* Fix conditions
2022-08-30 01:23:43 +03:00
Alex Root Junior
e7cee430b2
Update README.rst 2022-08-24 00:44:17 +03:00
Daniil
a812a40fd5
Update dispatcher.py (#987) 2022-08-24 00:38:03 +03:00
Alex Root Junior
3f57c69d4f
Fixed changelog // 2 2022-08-14 19:54:28 +03:00
Alex Root Junior
35533c57f1
Whitespace in changelog 2022-08-14 19:17:09 +03:00
Alex Root Junior
1b9e666557
Update docs 2022-08-14 18:54:43 +03:00
Alex Root Junior
0e0dbe7e59
Deprecate filters factory (#976)
* Deprecate filters factory

* Added changelog

* Update filters usage in docs and examples
2022-08-14 18:40:41 +03:00
Alex Root Junior
c1341ba2df
Added support of Bot API 6.2 (#975)
* Added support of Bot API 6.2
* Added changelog
* Update tests
* Update API version
* Update dependencies, pre-commit config
* Added pytest config
2022-08-14 16:32:29 +03:00
Alex Root Junior
4315ecf1a2
Dev 3.x flat package (#961)
* Move packages

* Added changelog

* Update examples/echo_bot.py

Co-authored-by: Oleg A. <t0rr@mail.ru>

* Rename `handler` -> `handlers`

* Update __init__.py

Co-authored-by: Oleg A. <t0rr@mail.ru>
2022-08-14 01:07:52 +03:00
Daniil Kovalenko
5e7932ca20
Fix default lock kwargs in RedisEventIsolation (#972)
* Fix default lock kwargs in RedisEventIsolation

* Add changelog
2022-08-09 19:48:37 +03:00
ShiroNoHaga
851f7a2a37
Add class helper ChatAction (#803)
* Add class helper ChatAction

* Change using helper to using enum.Enum

* Add test for class ChatAction

* Use black formatting

* Add pull request description to CHANGES

* Add test coverage

* Use AutoName class for enum values

* Move `AutoName` to separate file

* Move inheritance from `str`

* Fix failing mypy

* Delete old actions

Co-authored-by: Evgen Fil <evgfilim1@yandex.ru>
2022-07-09 23:47:11 +03:00
darksidecat
bc5b26de5f
Add __eq__ and __hash__ methods to State class (#928)
* Fix the ability to copy the state, now copying the state will return the same state.

* reformat

* full implement deepcopy with memo dict, add typehints

* Update aiogram/dispatcher/fsm/state.py

Co-authored-by: Oleg A. <t0rr@mail.ru>

* update tests

Co-authored-by: Oleg A. <t0rr@mail.ru>

* remove deepcopy in tests

Co-authored-by: Oleg A. <t0rr@mail.ru>

* remove deepcopy method

Co-authored-by: Oleg A. <t0rr@mail.ru>

* update changes description

Co-authored-by: Oleg A. <t0rr@mail.ru>

* update __eq__  method

Co-authored-by: Oleg A. <t0rr@mail.ru>

* add typehints, tests

* return False for not equal objects
creating FilterObject use getfullargspec that check State equality with `type` and `object` builtins, raising Error in `__eq__` method of State break this behavior

* return NotImplemented for other types

* use `!=` instead of 'not x == y' in tests

Co-authored-by: Oleg A. <t0rr@mail.ru>
2022-07-08 02:26:49 +03:00
Evgen Fil
416460e013
Skip running tests when there are no code or test changes (#948)
* Skip running tests when there are no code or test changes

* Allow config file changes to trigger tests
2022-06-26 19:16:17 +03:00
Evgen Fil
2cb0fd1c4b
Improve changelog check action (#949)
Make check faster when `skip news` label is present
Add `name:` root field
2022-06-26 16:22:32 +03:00
Oleg A
70088cdd65
Add full_name shortcut for Chat (#929)
Added full_name for Chat
2022-06-26 01:50:27 +03:00
Alex Root Junior
b8893c0971
#944 Rename "extract()" to "extract_from()" for entities (#945)
* #944 Rename "extract()" to "extract_from()" for entities
2022-06-26 01:36:45 +03:00
Alex Root Junior
fadb11515e
Remove deprecated methods (#943)
* #941 Removed deprecated methods
2022-06-25 22:47:08 +03:00
Evgen Fil
2c6d8ed5cb
Automatically put 3.x label on new pull requests to dev-3.x (#940) 2022-06-25 22:31:19 +03:00
Alex Root Junior
247ffbef69
3.x Bot API 6.1 (#937)
Added support of Bot API 6.1
2022-06-25 18:14:29 +03:00
Andrew
adfc89f125
Fix type hints for redis TTL params (#922)
* Allow to use `int` and `datetime.timedelta`

* Fix imports

* Added changelog

* Update CHANGES
2022-06-16 21:43:32 +03:00
Kostiantyn Kriuchkov
b3b320c106
Small typo fix (#920)
* Small typo fix

Changed CommandPatterType to CommandPatternType
Supposedly, the implied word is patterN

* Added to CHANGELOG
2022-06-10 11:48:19 +03:00
Alex Root Junior
824b43c436
#901 Fixed false-positive coercing of Union types in API methods (#912)
* #901 Fixed false-positive coercing of Union types in API methods

* Added default value for force_reply
2022-05-14 17:27:36 +03:00
Aleksandr
6ad242399b
#905 Added 3 missing content types (#906)
* Added 3 missing content types

* Added tests for 3 missing content types

* More tests

* Added changelog
2022-05-13 23:52:13 +03:00
Alex Root Junior
f2e02e2a7c
#896 Restrict including routers with strings (#897)
* #896 Restrict including routers with strings
* Remove imports util, bump dependencies
2022-04-25 21:24:58 +03:00
Alex Root Junior
4fb77a3a2a
Added possibility to combine filters or invert result (#895)
* Added possibility to combine filters or invert result
2022-04-24 04:19:19 +03:00
Alex Root Junior
7bfc941a1e
Fixed typy in WebApp docs page 2022-04-19 22:26:43 +03:00
Alex Root Junior
781e30c25b
Fixed changelog 2022-04-19 22:18:10 +03:00
Alex Root Junior
0d650fc38c
Release 3.0.0-beta.3 2022-04-19 22:16:35 +03:00
Alex Root Junior
497436595d
[3.x] Bot API 6.0 (#890)
* Base implementation

* Bump license

* Revert re-generated tests

* Fix tests, improved docs

* Remove TODO

* Removed unreachable code

* Changed type of `last_synchronization_error_date`

* Fixed wrongly cleaned code
2022-04-19 22:03:24 +03:00
Alex Root Junior
286cf39c8a
Beta 3 (#884)
* Rework middlewares, separate management to `MiddlewareManager` class

* Rework middlewares

* Added changes description for redis

* Added changes description for redis

* Fixed tests with Redis // aioredis replacement

* Changed msg.<html/md>_text attributes behaviour

* Added changelog for spoilers

* Added possibility to get command magic result as handler arguments
2022-04-16 19:07:32 +03:00
Michael
930bca0876
Fixed path of I18n Class (#879)
The I18n Class gets imported in 3.0.0b2 as follows:
from aiogram.utils.i18n import I18n

Whereas the documentation implies that it should be:
from aiogram.utils.i18n.code import I18n
2022-04-11 04:08:27 +03:00
Alex Root Junior
e8432d38f5
Add comment when PR is labeled 2022-04-11 04:06:39 +03:00
Alex Root Junior
7ae588d4b8
Delete comment when pull request is labeled 2022-04-11 03:59:09 +03:00
layerqa
370cd27471
Dispathcer to Dispatcher on docs (#881) 2022-04-11 03:34:24 +03:00
Alex Root Junior
1e5d231869
Update changelog action, try to fix PR from external repositories 2022-04-11 03:31:37 +03:00
Oleg A
ffe9506dc5
parse_mode should be UNSET instead of None (#877)
* fix: parse_mode should be UNSET instead of None

#876

* docs: add changelog

* docs: fixed changelog name

* fix: changelog typo fix
2022-04-06 04:19:31 +03:00
Alex Root Junior
b8aa03bc38
Added changelog changed validator (#873)
* Added changelog changed validator
2022-03-27 01:36:05 +02:00
Alexey
baf31a531a
Update aiohttp.rst (#872)
fix import
2022-03-26 17:55:08 +02:00
Gabben
a37bbba38c
Fix docs and examples (#864)
* Update magic_data Allowed handlers

* Fix ChatMemberUpdated example

* Fix examples with `.in_(...)` and delete with `@`

* Fix commands in examples

* Change List to Set
2022-03-26 17:30:46 +02:00
Oleg A
b50500e28d
fix: i18n User.language_code is optional (#871)
user.language_code is Optional and may raise an exception

#870
2022-03-26 17:22:11 +02:00
Gabben
79588b7c5d
Fix I18nMiddleware class (#859) 2022-03-05 02:33:45 +02:00
2680 changed files with 190122 additions and 18087 deletions

View file

@ -1 +1 @@
5.7 9.6

View file

@ -0,0 +1,16 @@
name: BotCommandScopeType
description: |
This object represents the scope to which bot commands are applied.
Source: https://core.telegram.org/bots/api#botcommandscope
multi_parse:
attribute: type
regexp: "must be ([a-z_]+)"
entities:
- BotCommandScopeDefault
- BotCommandScopeAllPrivateChats
- BotCommandScopeAllGroupChats
- BotCommandScopeAllChatAdministrators
- BotCommandScopeChat
- BotCommandScopeChatAdministrators
- BotCommandScopeChatMember

View file

@ -0,0 +1,12 @@
name: ButtonStyle
description: |
This object represents a button style (inline- or reply-keyboard).
Sources:
* https://core.telegram.org/bots/api#inlinekeyboardbutton
* https://core.telegram.org/bots/api#keyboardbutton
parse:
entity: InlineKeyboardButton
attribute: style
regexp: "'([a-z]+)'"

View file

@ -0,0 +1,22 @@
name: ChatAction
description: |
This object represents bot actions.
Choose one, depending on what the user is about to receive:
- typing for text messages,
- upload_photo for photos,
- record_video or upload_video for videos,
- record_voice or upload_voice for voice notes,
- upload_document for general files,
- choose_sticker for stickers,
- find_location for location data,
- record_video_note or upload_video_note for video notes.
Source: https://core.telegram.org/bots/api#sendchataction
parse:
format: rst
entity: sendChatAction
category: methods
attribute: action
regexp: '\*([a-z_]+)\*'

View file

@ -0,0 +1,12 @@
name: ChatBoostSourceType
description: |
This object represents a type of chat boost source.
Source: https://core.telegram.org/bots/api#chatboostsource
multi_parse:
attribute: source
regexp: "'([a-z_]+)'"
entities:
- ChatBoostSourcePremium
- ChatBoostSourceGiftCode
- ChatBoostSourceGiveaway

View file

@ -0,0 +1,15 @@
name: ChatMemberStatus
description: |
This object represents chat member status.
Source: https://core.telegram.org/bots/api#chatmember
multi_parse:
attribute: status
regexp: "'([a-z_]+)'"
entities:
- ChatMemberOwner
- ChatMemberAdministrator
- ChatMemberMember
- ChatMemberRestricted
- ChatMemberLeft
- ChatMemberBanned

View file

@ -0,0 +1,11 @@
name: ChatType
description: |
This object represents a chat type
Source: https://core.telegram.org/bots/api#chat
parse:
entity: Chat
attribute: type
regexp: "'([a-z]+)'"
static:
SENDER: sender

View file

@ -0,0 +1,52 @@
name: ContentType
description:
This object represents a type of content in message
static:
UNKNOWN: unknown
ANY: any
extract:
entity: Message
exclude:
- message_id
- message_thread_id
- from
- sender_chat
- date
- chat
- forward_from
- forward_from_chat
- forward_from_message_id
- forward_signature
- forward_sender_name
- forward_date
- is_topic_message
- is_automatic_forward
- via_bot
- edit_date
- has_protected_content
- media_group_id
- author_signature
- reply_markup
- entities
- caption
- caption_entities
- reply_to_message
- quote
- forward_origin
- external_reply
- link_preview_options
- sender_boost_count
- reply_to_story
- business_connection_id
- sender_business_bot
- sender_tag
- is_from_offline
- has_media_spoiler
- effect_id
- show_caption_above_media
- paid_star_count
- direct_messages_topic
- reply_to_checklist_task_id
- suggested_post_info
- is_paid_post
- reply_to_poll_option_id

View file

@ -0,0 +1,93 @@
name: Currency
description: |
Currencies supported by Telegram Bot API
Source: https://core.telegram.org/bots/payments#supported-currencies
static:
AED: "AED" # United Arab Emirates Dirham
AFN: "AFN" # Afghan Afghani
ALL: "ALL" # Albanian Lek
AMD: "AMD" # Armenian Dram
ARS: "ARS" # Argentine Peso
AUD: "AUD" # Australian Dollar
AZN: "AZN" # Azerbaijani Manat
BAM: "BAM" # Bosnia & Herzegovina Convertible Mark
BDT: "BDT" # Bangladeshi Taka
BGN: "BGN" # Bulgarian Lev
BND: "BND" # Brunei Dollar
BOB: "BOB" # Bolivian Boliviano
BRL: "BRL" # Brazilian Real
BYN: "BYN" # Belarusian ruble
CAD: "CAD" # Canadian Dollar
CHF: "CHF" # Swiss Franc
CLP: "CLP" # Chilean Peso
CNY: "CNY" # Chinese Renminbi Yuan
COP: "COP" # Colombian Peso
CRC: "CRC" # Costa Rican Colón
CZK: "CZK" # Czech Koruna
DKK: "DKK" # Danish Krone
DOP: "DOP" # Dominican Peso
DZD: "DZD" # Algerian Dinar
EGP: "EGP" # Egyptian Pound
ETB: "ETB" # Ethiopian Birr
EUR: "EUR" # Euro
GBP: "GBP" # British Pound
GEL: "GEL" # Georgian Lari
GTQ: "GTQ" # Guatemalan Quetzal
HKD: "HKD" # Hong Kong Dollar
HNL: "HNL" # Honduran Lempira
HRK: "HRK" # Croatian Kuna
HUF: "HUF" # Hungarian Forint
IDR: "IDR" # Indonesian Rupiah
ILS: "ILS" # Israeli New Sheqel
INR: "INR" # Indian Rupee
ISK: "ISK" # Icelandic Króna
JMD: "JMD" # Jamaican Dollar
JPY: "JPY" # Japanese Yen
KES: "KES" # Kenyan Shilling
KGS: "KGS" # Kyrgyzstani Som
KRW: "KRW" # South Korean Won
KZT: "KZT" # Kazakhstani Tenge
LBP: "LBP" # Lebanese Pound
LKR: "LKR" # Sri Lankan Rupee
MAD: "MAD" # Moroccan Dirham
MDL: "MDL" # Moldovan Leu
MNT: "MNT" # Mongolian Tögrög
MUR: "MUR" # Mauritian Rupee
MVR: "MVR" # Maldivian Rufiyaa
MXN: "MXN" # Mexican Peso
MYR: "MYR" # Malaysian Ringgit
MZN: "MZN" # Mozambican Metical
NGN: "NGN" # Nigerian Naira
NIO: "NIO" # Nicaraguan Córdoba
NOK: "NOK" # Norwegian Krone
NPR: "NPR" # Nepalese Rupee
NZD: "NZD" # New Zealand Dollar
PAB: "PAB" # Panamanian Balboa
PEN: "PEN" # Peruvian Nuevo Sol
PHP: "PHP" # Philippine Peso
PKR: "PKR" # Pakistani Rupee
PLN: "PLN" # Polish Złoty
PYG: "PYG" # Paraguayan Guaraní
QAR: "QAR" # Qatari Riyal
RON: "RON" # Romanian Leu
RSD: "RSD" # Serbian Dinar
RUB: "RUB" # Russian Ruble
SAR: "SAR" # Saudi Riyal
SEK: "SEK" # Swedish Krona
SGD: "SGD" # Singapore Dollar
THB: "THB" # Thai Baht
TJS: "TJS" # Tajikistani Somoni
TRY: "TRY" # Turkish Lira
TTD: "TTD" # Trinidad and Tobago Dollar
TWD: "TWD" # New Taiwan Dollar
TZS: "TZS" # Tanzanian Shilling
UAH: "UAH" # Ukrainian Hryvnia
UGX: "UGX" # Ugandan Shilling
USD: "USD" # United States Dollar
UYU: "UYU" # Uruguayan Peso
UZS: "UZS" # Uzbekistani Som
VND: "VND" # Vietnamese Đồng
YER: "YER" # Yemeni Rial
ZAR: "ZAR" # South African Rand

View file

@ -0,0 +1,12 @@
name: DiceEmoji
description: |
Emoji on which the dice throw animation is based
Source: https://core.telegram.org/bots/api#dice
static:
DICE: 🎲
DART: 🎯
BASKETBALL: 🏀
FOOTBALL:
SLOT_MACHINE: 🎰
BOWLING: 🎳

View file

@ -0,0 +1,10 @@
name: EncryptedPassportElement
description: |
This object represents type of encrypted passport element.
Source: https://core.telegram.org/bots/api#encryptedpassportelement
parse:
entity: EncryptedPassportElement
category: types
attribute: type
regexp: "'([a-z_]+)'"

View file

@ -0,0 +1,29 @@
name: InlineQueryResultType
description: |
Type of inline query result
Source: https://core.telegram.org/bots/api#inlinequeryresult
multi_parse:
attribute: type
regexp: "must be ([a-z_0-9]+)"
entities:
- InlineQueryResultCachedAudio
- InlineQueryResultCachedDocument
- InlineQueryResultCachedGif
- InlineQueryResultCachedMpeg4Gif
- InlineQueryResultCachedPhoto
- InlineQueryResultCachedSticker
- InlineQueryResultCachedVideo
- InlineQueryResultCachedVoice
- InlineQueryResultArticle
- InlineQueryResultAudio
- InlineQueryResultContact
- InlineQueryResultGame
- InlineQueryResultDocument
- InlineQueryResultGif
- InlineQueryResultLocation
- InlineQueryResultMpeg4Gif
- InlineQueryResultPhoto
- InlineQueryResultVenue
- InlineQueryResultVideo
- InlineQueryResultVoice

View file

@ -0,0 +1,14 @@
name: InputMediaType
description: |
This object represents input media type
Source: https://core.telegram.org/bots/api#inputmedia
multi_parse:
attribute: type
regexp: 'must be ([a-z_]+)'
entities:
- InputMediaAnimation
- InputMediaAudio
- InputMediaDocument
- InputMediaPhoto
- InputMediaVideo

View file

@ -0,0 +1,12 @@
name: InputPaidMediaType
description: |
This object represents the type of a media in a paid message.
Source: https://core.telegram.org/bots/api#inputpaidmedia
multi_parse:
format: rst
attribute: type
regexp: '\*([a-z_]+)\*'
entities:
- InputPaidMediaPhoto
- InputPaidMediaVideo

View file

@ -0,0 +1,11 @@
name: InputProfilePhotoType
description: |
This object represents input profile photo type
Source: https://core.telegram.org/bots/api#inputprofilephoto
multi_parse:
attribute: type
regexp: "must be *([a-z_]+)*"
entities:
- InputProfilePhotoStatic
- InputProfilePhotoAnimated

View file

@ -0,0 +1,11 @@
name: InputStoryContentType
description: |
This object represents input story content photo type.
Source: https://core.telegram.org/bots/api#inputstorycontentphoto
multi_parse:
attribute: type
regexp: "must be *([a-z_]+)*"
entities:
- InputStoryContentPhoto
- InputStoryContentVideo

View file

@ -0,0 +1,8 @@
name: KeyboardButtonPollTypeType
description: |
This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
Source: https://core.telegram.org/bots/api#keyboardbuttonpolltype
static:
QUIZ: "quiz"
REGULAR: "regular"

View file

@ -0,0 +1,9 @@
name: MaskPositionPoint
description: |
The part of the face relative to which the mask should be placed.
Source: https://core.telegram.org/bots/api#maskposition
parse:
entity: MaskPosition
attribute: point
regexp: "'([a-z_]+)'"

View file

@ -0,0 +1,13 @@
name: MenuButtonType
description: |
This object represents an type of Menu button
Source: https://core.telegram.org/bots/api#menubuttondefault
multi_parse:
format: rst
attribute: type
regexp: '\*([a-z_]+)\*'
entities:
- MenuButtonDefault
- MenuButtonCommands
- MenuButtonWebApp

View file

@ -0,0 +1,10 @@
name: MessageEntityType
description: |
This object represents type of message entity
Source: https://core.telegram.org/bots/api#messageentity
parse:
entity: MessageEntity
category: types
attribute: type
regexp: "'([a-z_]+)'"

View file

@ -0,0 +1,13 @@
name: MessageOriginType
description: |
This object represents origin of a message.
Source: https://core.telegram.org/bots/api#messageorigin
multi_parse:
attribute: type
regexp: "'([a-z_]+)'"
entities:
- MessageOriginUser
- MessageOriginHiddenUser
- MessageOriginChat
- MessageOriginChannel

View file

@ -0,0 +1,11 @@
name: OwnedGiftType
description: |
This object represents owned gift type
Source: https://core.telegram.org/bots/api#ownedgift
multi_parse:
attribute: type
regexp: "'([a-z_]+)'"
entities:
- OwnedGiftRegular
- OwnedGiftUnique

View file

@ -0,0 +1,13 @@
name: PaidMediaType
description: |
This object represents the type of a media in a paid message.
Source: https://core.telegram.org/bots/api#paidmedia
multi_parse:
format: rst
attribute: type
regexp: "'([a-z]+)'"
entities:
- PaidMediaPhoto
- PaidMediaPreview
- PaidMediaVideo

View file

@ -0,0 +1,9 @@
name: ParseMode
description: |
Formatting options
Source: https://core.telegram.org/bots/api#formatting-options
static:
MARKDOWN_V2: MarkdownV2
MARKDOWN: Markdown
HTML: HTML

View file

@ -0,0 +1,18 @@
name: PassportElementErrorType
description: |
This object represents a passport element error type.
Source: https://core.telegram.org/bots/api#passportelementerror
multi_parse:
attribute: source
regexp: 'must be ([a-z_]+)'
entities:
- PassportElementErrorDataField
- PassportElementErrorFrontSide
- PassportElementErrorReverseSide
- PassportElementErrorSelfie
- PassportElementErrorFile
- PassportElementErrorFiles
- PassportElementErrorTranslationFile
- PassportElementErrorTranslationFiles
- PassportElementErrorUnspecified

View file

@ -0,0 +1,9 @@
name: PollType
description: |
This object represents poll type
Source: https://core.telegram.org/bots/api#poll
parse:
entity: Poll
attribute: type
regexp: "'([a-z]+)'"

View file

@ -0,0 +1,12 @@
name: ReactionTypeType
description: |
This object represents reaction type.
Source: https://core.telegram.org/bots/api#reactiontype
multi_parse:
attribute: type
regexp: "'([a-z_]+)'"
entities:
- ReactionTypeEmoji
- ReactionTypeCustomEmoji
- ReactionTypePaid

View file

@ -0,0 +1,12 @@
name: RevenueWithdrawalStateType
description: |
This object represents a revenue withdrawal state type
Source: https://core.telegram.org/bots/api#revenuewithdrawalstate
multi_parse:
attribute: type
regexp: "'([a-z_]+)'"
entities:
- RevenueWithdrawalStateFailed
- RevenueWithdrawalStatePending
- RevenueWithdrawalStateSucceeded

View file

@ -0,0 +1,10 @@
name: StickerFormat
description: |
Format of the sticker
Source: https://core.telegram.org/bots/api#createnewstickerset
parse:
category: methods
entity: createNewStickerSet
attribute: sticker_format
regexp: "'([a-z_]+)'"

View file

@ -0,0 +1,9 @@
name: StickerType
description: |
The part of the face relative to which the mask should be placed.
Source: https://core.telegram.org/bots/api#maskposition
parse:
entity: Sticker
attribute: type
regexp: "'([a-z_]+)'"

View file

@ -0,0 +1,14 @@
name: StoryAreaTypeType
description: |
This object represents input profile photo type
Source: https://core.telegram.org/bots/api#storyareatype
multi_parse:
attribute: type
regexp: "'([a-z_]+)'"
entities:
- StoryAreaTypeLocation
- StoryAreaTypeSuggestedReaction
- StoryAreaTypeLink
- StoryAreaTypeWeather
- StoryAreaTypeUniqueGift

View file

@ -0,0 +1,13 @@
name: TopicIconColor
description: |
Color of the topic icon in RGB format.
Source: https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56
type: int
static:
BLUE: "0x6FB9F0"
YELLOW: "0xFFD67E"
VIOLET: "0xCB86DB"
GREEN: "0x8EEE98"
ROSE: "0xFF93B2"
RED: "0xFB6F5F"

View file

@ -0,0 +1,16 @@
name: TransactionPartnerType
description: |
This object represents a type of transaction partner.
Source: https://core.telegram.org/bots/api#transactionpartner
multi_parse:
attribute: type
regexp: "'([a-z_]+)'"
entities:
- TransactionPartnerFragment
- TransactionPartnerOther
- TransactionPartnerUser
- TransactionPartnerTelegramAds
- TransactionPartnerTelegramApi
- TransactionPartnerAffiliateProgram
- TransactionPartnerChat

View file

@ -0,0 +1,10 @@
name: TransactionPartnerUserTransactionTypeEnum
description: |
This object represents type of the transaction that were made by partner user.
Source: https://core.telegram.org/bots/api#transactionpartneruser
parse:
entity: TransactionPartnerUser
category: types
attribute: transaction_type
regexp: "'([a-z_]+)'"

View file

@ -0,0 +1,9 @@
name: UpdateType
description: |
This object represents the complete list of allowed update types
Source: https://core.telegram.org/bots/api#update
extract:
entity: Update
exclude:
- update_id

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "addstickertoset",
"name": "addStickerToSet",
"description": "Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns True on success.",
"html_description": "<p>Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",
"required": true,
"description": "User identifier of sticker set owner",
"html_description": "<td>User identifier of sticker set owner</td>",
"rst_description": "User identifier of sticker set owner\n",
"name": "user_id"
},
{
"type": "String",
"required": true,
"description": "Sticker set name",
"html_description": "<td>Sticker set name</td>",
"rst_description": "Sticker set name\n",
"name": "name"
},
{
"type": "InputSticker",
"required": true,
"description": "A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.",
"html_description": "<td>A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.</td>",
"rst_description": "A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.\n",
"name": "sticker"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,57 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "answercallbackquery",
"name": "answerCallbackQuery",
"description": "Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.\nAlternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.",
"html_description": "<p>Use this method to send answers to callback queries sent from <a href=\"/bots/features#inline-keyboards\">inline keyboards</a>. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, <em>True</em> is returned.</p><blockquote>\n<p>Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via <a href=\"https://t.me/botfather\">@BotFather</a> and accept the terms. Otherwise, you may use links like <code>t.me/your_bot?start=XXXX</code> that open your bot with a parameter.</p>\n</blockquote>",
"rst_description": "Use this method to send answers to callback queries sent from `inline keyboards <https://core.telegram.org/bots/features#inline-keyboards>`_. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, :code:`True` is returned.\n\n Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather <https://t.me/botfather>`_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier for the query to be answered",
"html_description": "<td>Unique identifier for the query to be answered</td>",
"rst_description": "Unique identifier for the query to be answered\n",
"name": "callback_query_id"
},
{
"type": "String",
"required": false,
"description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters",
"html_description": "<td>Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters</td>",
"rst_description": "Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters\n",
"name": "text"
},
{
"type": "Boolean",
"required": false,
"description": "If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.",
"html_description": "<td>If <em>True</em>, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to <em>false</em>.</td>",
"rst_description": "If :code:`True`, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.\n",
"name": "show_alert"
},
{
"type": "String",
"required": false,
"description": "URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @BotFather, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button.\n\nOtherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.",
"html_description": "<td>URL that will be opened by the user's client. If you have created a <a href=\"#game\">Game</a> and accepted the conditions via <a href=\"https://t.me/botfather\">@BotFather</a>, specify the URL that opens your game - note that this will only work if the query comes from a <a href=\"#inlinekeyboardbutton\"><em>callback_game</em></a> button.<br/>\n<br/>\nOtherwise, you may use links like <code>t.me/your_bot?start=XXXX</code> that open your bot with a parameter.</td>",
"rst_description": "URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather <https://t.me/botfather>`_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton <https://core.telegram.org/bots/api#inlinekeyboardbutton>`_ *callback_game* button.\n\n\n\nOtherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter.\n",
"name": "url"
},
{
"type": "Integer",
"required": false,
"description": "The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.",
"html_description": "<td>The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.</td>",
"rst_description": "The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.\n",
"name": "cache_time"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,89 @@
{
"meta": {},
"group": {
"title": "Inline mode",
"anchor": "inline-mode"
},
"object": {
"anchor": "answerinlinequery",
"name": "answerInlineQuery",
"description": "Use this method to send answers to an inline query. On success, True is returned.\nNo more than 50 results per query are allowed.",
"html_description": "<p>Use this method to send answers to an inline query. On success, <em>True</em> is returned.<br/>\nNo more than <strong>50</strong> results per query are allowed.</p>",
"rst_description": "Use this method to send answers to an inline query. On success, :code:`True` is returned.\n\nNo more than **50** results per query are allowed.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier for the answered query",
"html_description": "<td>Unique identifier for the answered query</td>",
"rst_description": "Unique identifier for the answered query\n",
"name": "inline_query_id"
},
{
"type": "Array of InlineQueryResult",
"required": true,
"description": "A JSON-serialized array of results for the inline query",
"html_description": "<td>A JSON-serialized array of results for the inline query</td>",
"rst_description": "A JSON-serialized array of results for the inline query\n",
"name": "results"
},
{
"type": "Integer",
"required": false,
"description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.",
"html_description": "<td>The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.</td>",
"rst_description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.\n",
"name": "cache_time"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query.",
"html_description": "<td>Pass <em>True</em> if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query.</td>",
"rst_description": "Pass :code:`True` if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query.\n",
"name": "is_personal"
},
{
"type": "String",
"required": false,
"description": "Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.",
"html_description": "<td>Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.</td>",
"rst_description": "Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.\n",
"name": "next_offset"
},
{
"type": "InlineQueryResultsButton",
"required": false,
"description": "A JSON-serialized object describing a button to be shown above inline query results",
"html_description": "<td>A JSON-serialized object describing a button to be shown above inline query results</td>",
"rst_description": "A JSON-serialized object describing a button to be shown above inline query results\n",
"name": "button"
},
{
"type": "String",
"required": false,
"description": "Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.\n\nExample: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.",
"html_description": "<td><a href=\"/bots/features#deep-linking\">Deep-linking</a> parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only <code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>_</code> and <code>-</code> are allowed.<br/>\n<br/>\n<em>Example:</em> An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a <a href=\"#inlinekeyboardmarkup\"><em>switch_inline</em></a> button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.</td>",
"rst_description": "`Deep-linking <https://core.telegram.org/bots/features#deep-linking>`_ parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed.\n\n\n\n*Example:* An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a `https://core.telegram.org/bots/api#inlinekeyboardmarkup <https://core.telegram.org/bots/api#inlinekeyboardmarkup>`_ *switch_inline* button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.\n",
"name": "switch_pm_parameter",
"deprecated": {
"version": "6.7",
"release_date": "2023-04-21"
}
},
{
"type": "String",
"required": false,
"description": "If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter",
"html_description": "<td>If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter <em>switch_pm_parameter</em></td>",
"rst_description": "If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch_pm_parameter*\n",
"name": "switch_pm_text",
"deprecated": {
"version": "6.7",
"release_date": "2023-04-21"
}
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "answerprecheckoutquery",
"name": "answerPreCheckoutQuery",
"description": "Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.",
"html_description": "<p>Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an <a href=\"#update\">Update</a> with the field <em>pre_checkout_query</em>. Use this method to respond to such pre-checkout queries. On success, <em>True</em> is returned. <strong>Note:</strong> The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.</p>",
"rst_description": "Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an :class:`aiogram.types.update.Update` with the field *pre_checkout_query*. Use this method to respond to such pre-checkout queries. On success, :code:`True` is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier for the query to be answered",
"html_description": "<td>Unique identifier for the query to be answered</td>",
"rst_description": "Unique identifier for the query to be answered\n",
"name": "pre_checkout_query_id"
},
{
"type": "Boolean",
"required": true,
"description": "Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.",
"html_description": "<td>Specify <em>True</em> if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use <em>False</em> if there are any problems.</td>",
"rst_description": "Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems.\n",
"name": "ok"
},
{
"type": "String",
"required": false,
"description": "Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.",
"html_description": "<td>Required if <em>ok</em> is <em>False</em>. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.</td>",
"rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user.\n",
"name": "error_message"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "answershippingquery",
"name": "answerShippingQuery",
"description": "If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.",
"html_description": "<p>If you sent an invoice requesting a shipping address and the parameter <em>is_flexible</em> was specified, the Bot API will send an <a href=\"#update\">Update</a> with a <em>shipping_query</em> field to the bot. Use this method to reply to shipping queries. On success, <em>True</em> is returned.</p>",
"rst_description": "If you sent an invoice requesting a shipping address and the parameter *is_flexible* was specified, the Bot API will send an :class:`aiogram.types.update.Update` with a *shipping_query* field to the bot. Use this method to reply to shipping queries. On success, :code:`True` is returned.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier for the query to be answered",
"html_description": "<td>Unique identifier for the query to be answered</td>",
"rst_description": "Unique identifier for the query to be answered\n",
"name": "shipping_query_id"
},
{
"type": "Boolean",
"required": true,
"description": "Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)",
"html_description": "<td>Pass <em>True</em> if delivery to the specified address is possible and <em>False</em> if there are any problems (for example, if delivery to the specified address is not possible)</td>",
"rst_description": "Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible)\n",
"name": "ok"
},
{
"type": "Array of ShippingOption",
"required": false,
"description": "Required if ok is True. A JSON-serialized array of available shipping options.",
"html_description": "<td>Required if <em>ok</em> is <em>True</em>. A JSON-serialized array of available shipping options.</td>",
"rst_description": "Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.\n",
"name": "shipping_options"
},
{
"type": "String",
"required": false,
"description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.",
"html_description": "<td>Required if <em>ok</em> is <em>False</em>. Error message in human readable form that explains why it is impossible to complete the order (e.g. &#8220;Sorry, delivery to your desired address is unavailable&#8221;). Telegram will display this message to the user.</td>",
"rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.\n",
"name": "error_message"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "answerwebappquery",
"name": "answerWebAppQuery",
"description": "Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.",
"html_description": "<p>Use this method to set the result of an interaction with a <a href=\"/bots/webapps\">Web App</a> and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a <a href=\"#sentwebappmessage\">SentWebAppMessage</a> object is returned.</p>",
"rst_description": "Use this method to set the result of an interaction with a `Web App <https://core.telegram.org/bots/webapps>`_ and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier for the query to be answered",
"html_description": "<td>Unique identifier for the query to be answered</td>",
"rst_description": "Unique identifier for the query to be answered\n",
"name": "web_app_query_id"
},
{
"type": "InlineQueryResult",
"required": true,
"description": "A JSON-serialized object describing the message to be sent",
"html_description": "<td>A JSON-serialized object describing the message to be sent</td>",
"rst_description": "A JSON-serialized object describing the message to be sent\n",
"name": "result"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "approvechatjoinrequest",
"name": "approveChatJoinRequest",
"description": "Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.",
"html_description": "<p>Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the <em>can_invite_users</em> administrator right. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier of the target user",
"html_description": "<td>Unique identifier of the target user</td>",
"rst_description": "Unique identifier of the target user\n",
"name": "user_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "approvesuggestedpost",
"name": "approveSuggestedPost",
"description": "Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success.",
"html_description": "<p>Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target direct messages chat",
"html_description": "<td>Unique identifier for the target direct messages chat</td>",
"rst_description": "Unique identifier for the target direct messages chat\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Identifier of a suggested post message to approve",
"html_description": "<td>Identifier of a suggested post message to approve</td>",
"rst_description": "Identifier of a suggested post message to approve\n",
"name": "message_id"
},
{
"type": "Integer",
"required": false,
"description": "Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future",
"html_description": "<td>Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future</td>",
"rst_description": "Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future\n",
"name": "send_date"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,11 @@
annotations:
send_date:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "banchatmember",
"name": "banChatMember",
"description": "Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.",
"html_description": "<p>Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless <a href=\"#unbanchatmember\">unbanned</a> first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless `unbanned <https://core.telegram.org/bots/api#unbanchatmember>`_ first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target group or username of the target supergroup or channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier of the target user",
"html_description": "<td>Unique identifier of the target user</td>",
"rst_description": "Unique identifier of the target user\n",
"name": "user_id"
},
{
"type": "Integer",
"required": false,
"description": "Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.",
"html_description": "<td>Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.</td>",
"rst_description": "Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.\n",
"name": "until_date"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.",
"html_description": "<td>Pass <em>True</em> to delete all messages from the chat for the user that is being removed. If <em>False</em>, the user will be able to see messages in the group that were sent before the user was removed. Always <em>True</em> for supergroups and channels.</td>",
"rst_description": "Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels.\n",
"name": "revoke_messages"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,11 @@
annotations:
until_date:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "banchatsenderchat",
"name": "banChatSenderChat",
"description": "Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.",
"html_description": "<p>Use this method to ban a channel chat in a supergroup or a channel. Until the chat is <a href=\"#unbanchatsenderchat\">unbanned</a>, the owner of the banned chat won't be able to send messages on behalf of <strong>any of their channels</strong>. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to ban a channel chat in a supergroup or a channel. Until the chat is `unbanned <https://core.telegram.org/bots/api#unbanchatsenderchat>`_, the owner of the banned chat won't be able to send messages on behalf of **any of their channels**. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier of the target sender chat",
"html_description": "<td>Unique identifier of the target sender chat</td>",
"rst_description": "Unique identifier of the target sender chat\n",
"name": "sender_chat_id"
}
],
"category": "methods"
}
}

16
.butcher/methods/close/entity.json generated Normal file
View file

@ -0,0 +1,16 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "close",
"name": "close",
"description": "Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.",
"html_description": "<p>Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns <em>True</em> on success. Requires no parameters.</p>",
"rst_description": "Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns :code:`True` on success. Requires no parameters.",
"annotations": [],
"category": "methods"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "closeforumtopic",
"name": "closeForumTopic",
"description": "Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.",
"html_description": "<p>Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target message thread of the forum topic",
"html_description": "<td>Unique identifier for the target message thread of the forum topic</td>",
"rst_description": "Unique identifier for the target message thread of the forum topic\n",
"name": "message_thread_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "closegeneralforumtopic",
"name": "closeGeneralForumTopic",
"description": "Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.",
"html_description": "<p>Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n",
"name": "chat_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "convertgifttostars",
"name": "convertGiftToStars",
"description": "Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right. Returns True on success.",
"html_description": "<p>Converts a given regular gift to Telegram Stars. Requires the <em>can_convert_gifts_to_stars</em> business bot right. Returns <em>True</em> on success.</p>",
"rst_description": "Converts a given regular gift to Telegram Stars. Requires the *can_convert_gifts_to_stars* business bot right. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier of the business connection",
"html_description": "<td>Unique identifier of the business connection</td>",
"rst_description": "Unique identifier of the business connection\n",
"name": "business_connection_id"
},
{
"type": "String",
"required": true,
"description": "Unique identifier of the regular gift that should be converted to Telegram Stars",
"html_description": "<td>Unique identifier of the regular gift that should be converted to Telegram Stars</td>",
"rst_description": "Unique identifier of the regular gift that should be converted to Telegram Stars\n",
"name": "owned_gift_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,3 @@
parse_mode: parse_mode
protect_content: protect_content
show_caption_above_media: show_caption_above_media

177
.butcher/methods/copyMessage/entity.json generated Normal file
View file

@ -0,0 +1,177 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "copymessage",
"name": "copyMessage",
"description": "Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.",
"html_description": "<p>Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz <a href=\"#poll\">poll</a> can be copied only if the value of the field <em>correct_option_id</em> is known to the bot. The method is analogous to the method <a href=\"#forwardmessage\">forwardMessage</a>, but the copied message doesn't have a link to the original message. Returns the <a href=\"#messageid\">MessageId</a> of the sent message on success.</p>",
"rst_description": "Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_message.ForwardMessage`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": false,
"description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
"html_description": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)",
"html_description": "<td>Unique identifier for the chat where the original message was sent (or channel username in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n",
"name": "from_chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Message identifier in the chat specified in from_chat_id",
"html_description": "<td>Message identifier in the chat specified in <em>from_chat_id</em></td>",
"rst_description": "Message identifier in the chat specified in *from_chat_id*\n",
"name": "message_id"
},
{
"type": "Integer",
"required": false,
"description": "New start timestamp for the copied video in the message",
"html_description": "<td>New start timestamp for the copied video in the message</td>",
"rst_description": "New start timestamp for the copied video in the message\n",
"name": "video_start_timestamp"
},
{
"type": "String",
"required": false,
"description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept",
"html_description": "<td>New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept</td>",
"rst_description": "New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept\n",
"name": "caption"
},
{
"type": "String",
"required": false,
"description": "Mode for parsing entities in the new caption. See formatting options for more details.",
"html_description": "<td>Mode for parsing entities in the new caption. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "Mode for parsing entities in the new caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"name": "parse_mode"
},
{
"type": "Array of MessageEntity",
"required": false,
"description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode",
"html_description": "<td>A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of <em>parse_mode</em></td>",
"rst_description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*\n",
"name": "caption_entities"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True, if the caption must be shown above the message media. Ignored if a new caption isn't specified.",
"html_description": "<td>Pass <em>True</em>, if the caption must be shown above the message media. Ignored if a new caption isn't specified.</td>",
"rst_description": "Pass :code:`True`, if the caption must be shown above the message media. Ignored if a new caption isn't specified.\n",
"name": "show_caption_above_media"
},
{
"type": "Boolean",
"required": false,
"description": "Sends the message silently. Users will receive a notification with no sound.",
"html_description": "<td>Sends the message <a href=\"https://telegram.org/blog/channels-2-0#silent-messages\">silently</a>. Users will receive a notification with no sound.</td>",
"rst_description": "Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.\n",
"name": "disable_notification"
},
{
"type": "Boolean",
"required": false,
"description": "Protects the contents of the sent message from forwarding and saving",
"html_description": "<td>Protects the contents of the sent message from forwarding and saving</td>",
"rst_description": "Protects the contents of the sent message from forwarding and saving\n",
"name": "protect_content"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance",
"html_description": "<td>Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href=\"https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once\">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance</td>",
"rst_description": "Pass :code:`True` to allow up to 1000 messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`_ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance\n",
"name": "allow_paid_broadcast"
},
{
"type": "String",
"required": false,
"description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats",
"html_description": "<td>Unique identifier of the message effect to be added to the message; only available when copying to private chats</td>",
"rst_description": "Unique identifier of the message effect to be added to the message; only available when copying to private chats\n",
"name": "message_effect_id"
},
{
"type": "SuggestedPostParameters",
"required": false,
"description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.",
"html_description": "<td>A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.</td>",
"rst_description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.\n",
"name": "suggested_post_parameters"
},
{
"type": "ReplyParameters",
"required": false,
"description": "Description of the message to reply to",
"html_description": "<td>Description of the message to reply to</td>",
"rst_description": "Description of the message to reply to\n",
"name": "reply_parameters"
},
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user\n",
"name": "reply_markup"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the message should be sent even if the specified replied-to message is not found",
"html_description": "<td>Pass <em>True</em> if the message should be sent even if the specified replied-to message is not found</td>",
"rst_description": "Pass :code:`True` if the message should be sent even if the specified replied-to message is not found\n",
"name": "allow_sending_without_reply",
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
},
{
"type": "Integer",
"required": false,
"description": "If the message is a reply, ID of the original message",
"html_description": "<td>If the message is a reply, ID of the original message</td>",
"rst_description": "If the message is a reply, ID of the original message\n",
"name": "reply_to_message_id",
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,11 @@
annotations:
video_start_timestamp:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -0,0 +1,81 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "copymessages",
"name": "copyMessages",
"description": "Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned.",
"html_description": "<p>Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz <a href=\"#poll\">poll</a> can be copied only if the value of the field <em>correct_option_id</em> is known to the bot. The method is analogous to the method <a href=\"#forwardmessages\">forwardMessages</a>, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of <a href=\"#messageid\">MessageId</a> of the sent messages is returned.</p>",
"rst_description": "Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_messages.ForwardMessages`, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": false,
"description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
"html_description": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)",
"html_description": "<td>Unique identifier for the chat where the original messages were sent (or channel username in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)\n",
"name": "from_chat_id"
},
{
"type": "Array of Integer",
"required": true,
"description": "A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.",
"html_description": "<td>A JSON-serialized list of 1-100 identifiers of messages in the chat <em>from_chat_id</em> to copy. The identifiers must be specified in a strictly increasing order.</td>",
"rst_description": "A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order.\n",
"name": "message_ids"
},
{
"type": "Boolean",
"required": false,
"description": "Sends the messages silently. Users will receive a notification with no sound.",
"html_description": "<td>Sends the messages <a href=\"https://telegram.org/blog/channels-2-0#silent-messages\">silently</a>. Users will receive a notification with no sound.</td>",
"rst_description": "Sends the messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.\n",
"name": "disable_notification"
},
{
"type": "Boolean",
"required": false,
"description": "Protects the contents of the sent messages from forwarding and saving",
"html_description": "<td>Protects the contents of the sent messages from forwarding and saving</td>",
"rst_description": "Protects the contents of the sent messages from forwarding and saving\n",
"name": "protect_content"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to copy the messages without their captions",
"html_description": "<td>Pass <em>True</em> to copy the messages without their captions</td>",
"rst_description": "Pass :code:`True` to copy the messages without their captions\n",
"name": "remove_caption"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,57 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "createchatinvitelink",
"name": "createChatInviteLink",
"description": "Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.",
"html_description": "<p>Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method <a href=\"#revokechatinvitelink\">revokeChatInviteLink</a>. Returns the new invite link as <a href=\"#chatinvitelink\">ChatInviteLink</a> object.</p>",
"rst_description": "Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "String",
"required": false,
"description": "Invite link name; 0-32 characters",
"html_description": "<td>Invite link name; 0-32 characters</td>",
"rst_description": "Invite link name; 0-32 characters\n",
"name": "name"
},
{
"type": "Integer",
"required": false,
"description": "Point in time (Unix timestamp) when the link will expire",
"html_description": "<td>Point in time (Unix timestamp) when the link will expire</td>",
"rst_description": "Point in time (Unix timestamp) when the link will expire\n",
"name": "expire_date"
},
{
"type": "Integer",
"required": false,
"description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999",
"html_description": "<td>The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999</td>",
"rst_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n",
"name": "member_limit"
},
{
"type": "Boolean",
"required": false,
"description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified",
"html_description": "<td><em>True</em>, if users joining the chat via the link need to be approved by chat administrators. If <em>True</em>, <em>member_limit</em> can't be specified</td>",
"rst_description": ":code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified\n",
"name": "creates_join_request"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,11 @@
annotations:
expire_date:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "createchatsubscriptioninvitelink",
"name": "createChatSubscriptionInviteLink",
"description": "Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.",
"html_description": "<p>Use this method to create a <a href=\"https://telegram.org/blog/superchannels-star-reactions-subscriptions#star-subscriptions\">subscription invite link</a> for a channel chat. The bot must have the <em>can_invite_users</em> administrator rights. The link can be edited using the method <a href=\"#editchatsubscriptioninvitelink\">editChatSubscriptionInviteLink</a> or revoked using the method <a href=\"#revokechatinvitelink\">revokeChatInviteLink</a>. Returns the new invite link as a <a href=\"#chatinvitelink\">ChatInviteLink</a> object.</p>",
"rst_description": "Use this method to create a `subscription invite link <https://telegram.org/blog/superchannels-star-reactions-subscriptions#star-subscriptions>`_ for a channel chat. The bot must have the *can_invite_users* administrator rights. The link can be edited using the method :class:`aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink` or revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target channel chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target channel chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "String",
"required": false,
"description": "Invite link name; 0-32 characters",
"html_description": "<td>Invite link name; 0-32 characters</td>",
"rst_description": "Invite link name; 0-32 characters\n",
"name": "name"
},
{
"type": "Integer",
"required": true,
"description": "The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).",
"html_description": "<td>The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).</td>",
"rst_description": "The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).\n",
"name": "subscription_period"
},
{
"type": "Integer",
"required": true,
"description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000",
"html_description": "<td>The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000</td>",
"rst_description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000\n",
"name": "subscription_price"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,11 @@
annotations:
subscription_period:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "createforumtopic",
"name": "createForumTopic",
"description": "Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator right. Returns information about the created topic as a ForumTopic object.",
"html_description": "<p>Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator right. Returns information about the created topic as a <a href=\"#forumtopic\">ForumTopic</a> object.</p>",
"rst_description": "Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator right. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n",
"name": "chat_id"
},
{
"type": "String",
"required": true,
"description": "Topic name, 1-128 characters",
"html_description": "<td>Topic name, 1-128 characters</td>",
"rst_description": "Topic name, 1-128 characters\n",
"name": "name"
},
{
"type": "Integer",
"required": false,
"description": "Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)",
"html_description": "<td>Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)</td>",
"rst_description": "Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)\n",
"name": "icon_color"
},
{
"type": "String",
"required": false,
"description": "Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.",
"html_description": "<td>Unique identifier of the custom emoji shown as the topic icon. Use <a href=\"#getforumtopiciconstickers\">getForumTopicIconStickers</a> to get all allowed custom emoji identifiers.</td>",
"rst_description": "Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.\n",
"name": "icon_custom_emoji_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,193 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "createinvoicelink",
"name": "createInvoiceLink",
"description": "Use this method to create a link for an invoice. Returns the created invoice link as String on success.",
"html_description": "<p>Use this method to create a link for an invoice. Returns the created invoice link as <em>String</em> on success.</p>",
"rst_description": "Use this method to create a link for an invoice. Returns the created invoice link as *String* on success.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the link will be created. For payments in Telegram Stars only.",
"html_description": "<td>Unique identifier of the business connection on behalf of which the link will be created. For payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a> only.</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the link will be created. For payments in `Telegram Stars <https://t.me/BotNews/90>`_ only.\n",
"name": "business_connection_id"
},
{
"type": "String",
"required": true,
"description": "Product name, 1-32 characters",
"html_description": "<td>Product name, 1-32 characters</td>",
"rst_description": "Product name, 1-32 characters\n",
"name": "title"
},
{
"type": "String",
"required": true,
"description": "Product description, 1-255 characters",
"html_description": "<td>Product description, 1-255 characters</td>",
"rst_description": "Product description, 1-255 characters\n",
"name": "description"
},
{
"type": "String",
"required": true,
"description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.",
"html_description": "<td>Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.</td>",
"rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.\n",
"name": "payload"
},
{
"type": "String",
"required": false,
"description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.",
"html_description": "<td>Payment provider token, obtained via <a href=\"https://t.me/botfather\">@BotFather</a>. Pass an empty string for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Payment provider token, obtained via `@BotFather <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "provider_token"
},
{
"type": "String",
"required": true,
"description": "Three-letter ISO 4217 currency code, see more on currencies. Pass 'XTR' for payments in Telegram Stars.",
"html_description": "<td>Three-letter ISO 4217 currency code, see <a href=\"/bots/payments#supported-currencies\">more on currencies</a>. Pass &#8220;XTR&#8221; for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Three-letter ISO 4217 currency code, see `more on currencies <https://core.telegram.org/bots/payments#supported-currencies>`_. Pass 'XTR' for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "currency"
},
{
"type": "Array of LabeledPrice",
"required": true,
"description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.",
"html_description": "<td>Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "prices"
},
{
"type": "Integer",
"required": false,
"description": "The number of seconds the subscription will be active for before the next payment. The currency must be set to 'XTR' (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.",
"html_description": "<td>The number of seconds the subscription will be active for before the next payment. The currency must be set to &#8220;XTR&#8221; (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.</td>",
"rst_description": "The number of seconds the subscription will be active for before the next payment. The currency must be set to 'XTR' (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.\n",
"name": "subscription_period"
},
{
"type": "Integer",
"required": false,
"description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.",
"html_description": "<td>The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a maximum tip of <code>US$ 1.45</code> pass <code>max_tip_amount = 145</code>. See the <em>exp</em> parameter in <a href=\"/bots/payments/currencies.json\">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json <https://core.telegram.org/bots/payments/currencies.json>`_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "max_tip_amount"
},
{
"type": "Array of Integer",
"required": false,
"description": "A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.",
"html_description": "<td>A JSON-serialized array of suggested amounts of tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed <em>max_tip_amount</em>.</td>",
"rst_description": "A JSON-serialized array of suggested amounts of tips in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*.\n",
"name": "suggested_tip_amounts"
},
{
"type": "String",
"required": false,
"description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.",
"html_description": "<td>JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.</td>",
"rst_description": "JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.\n",
"name": "provider_data"
},
{
"type": "String",
"required": false,
"description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.",
"html_description": "<td>URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.</td>",
"rst_description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.\n",
"name": "photo_url"
},
{
"type": "Integer",
"required": false,
"description": "Photo size in bytes",
"html_description": "<td>Photo size in bytes</td>",
"rst_description": "Photo size in bytes\n",
"name": "photo_size"
},
{
"type": "Integer",
"required": false,
"description": "Photo width",
"html_description": "<td>Photo width</td>",
"rst_description": "Photo width\n",
"name": "photo_width"
},
{
"type": "Integer",
"required": false,
"description": "Photo height",
"html_description": "<td>Photo height</td>",
"rst_description": "Photo height\n",
"name": "photo_height"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if you require the user's full name to complete the order. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "need_name"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if you require the user's phone number to complete the order. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "need_phone_number"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if you require the user's email address to complete the order. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "need_email"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if you require the user's shipping address to complete the order. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "need_shipping_address"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if the user's phone number should be sent to the provider. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "send_phone_number_to_provider"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if the user's email address should be sent to the provider. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "send_email_to_provider"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if the final price depends on the shipping method. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "is_flexible"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,77 @@
{
"meta": {},
"group": {
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "createnewstickerset",
"name": "createNewStickerSet",
"description": "Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success.",
"html_description": "<p>Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",
"required": true,
"description": "User identifier of created sticker set owner",
"html_description": "<td>User identifier of created sticker set owner</td>",
"rst_description": "User identifier of created sticker set owner\n",
"name": "user_id"
},
{
"type": "String",
"required": true,
"description": "Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in \"_by_<bot_username>\". <bot_username> is case insensitive. 1-64 characters.",
"html_description": "<td>Short name of sticker set, to be used in <code>t.me/addstickers/</code> URLs (e.g., <em>animals</em>). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in <code>\"_by_&lt;bot_username&gt;\"</code>. <code>&lt;bot_username&gt;</code> is case insensitive. 1-64 characters.</td>",
"rst_description": "Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`\"_by_<bot_username>\"`. :code:`<bot_username>` is case insensitive. 1-64 characters.\n",
"name": "name"
},
{
"type": "String",
"required": true,
"description": "Sticker set title, 1-64 characters",
"html_description": "<td>Sticker set title, 1-64 characters</td>",
"rst_description": "Sticker set title, 1-64 characters\n",
"name": "title"
},
{
"type": "Array of InputSticker",
"required": true,
"description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set",
"html_description": "<td>A JSON-serialized list of 1-50 initial stickers to be added to the sticker set</td>",
"rst_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set\n",
"name": "stickers"
},
{
"type": "String",
"required": false,
"description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.",
"html_description": "<td>Type of stickers in the set, pass &#8220;regular&#8221;, &#8220;mask&#8221;, or &#8220;custom_emoji&#8221;. By default, a regular sticker set is created.</td>",
"rst_description": "Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.\n",
"name": "sticker_type"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only",
"html_description": "<td>Pass <em>True</em> if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only</td>",
"rst_description": "Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only\n",
"name": "needs_repainting"
},
{
"type": "String",
"required": false,
"description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'",
"html_description": "<td>Format of stickers in the set, must be one of &#8220;static&#8221;, &#8220;animated&#8221;, &#8220;video&#8221;</td>",
"rst_description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'\n",
"name": "sticker_format",
"deprecated": {
"version": "7.2",
"release_date": "2024-03-31"
}
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "declinechatjoinrequest",
"name": "declineChatJoinRequest",
"description": "Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.",
"html_description": "<p>Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the <em>can_invite_users</em> administrator right. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier of the target user",
"html_description": "<td>Unique identifier of the target user</td>",
"rst_description": "Unique identifier of the target user\n",
"name": "user_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "declinesuggestedpost",
"name": "declineSuggestedPost",
"description": "Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success.",
"html_description": "<p>Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target direct messages chat",
"html_description": "<td>Unique identifier for the target direct messages chat</td>",
"rst_description": "Unique identifier for the target direct messages chat\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Identifier of a suggested post message to decline",
"html_description": "<td>Identifier of a suggested post message to decline</td>",
"rst_description": "Identifier of a suggested post message to decline\n",
"name": "message_id"
},
{
"type": "String",
"required": false,
"description": "Comment for the creator of the suggested post; 0-128 characters",
"html_description": "<td>Comment for the creator of the suggested post; 0-128 characters</td>",
"rst_description": "Comment for the creator of the suggested post; 0-128 characters\n",
"name": "comment"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "deletebusinessmessages",
"name": "deleteBusinessMessages",
"description": "Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.",
"html_description": "<p>Delete messages on behalf of a business account. Requires the <em>can_delete_sent_messages</em> business bot right to delete messages sent by the bot itself, or the <em>can_delete_all_messages</em> business bot right to delete any message. Returns <em>True</em> on success.</p>",
"rst_description": "Delete messages on behalf of a business account. Requires the *can_delete_sent_messages* business bot right to delete messages sent by the bot itself, or the *can_delete_all_messages* business bot right to delete any message. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier of the business connection on behalf of which to delete the messages",
"html_description": "<td>Unique identifier of the business connection on behalf of which to delete the messages</td>",
"rst_description": "Unique identifier of the business connection on behalf of which to delete the messages\n",
"name": "business_connection_id"
},
{
"type": "Array of Integer",
"required": true,
"description": "A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted",
"html_description": "<td>A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See <a href=\"#deletemessage\">deleteMessage</a> for limitations on which messages can be deleted</td>",
"rst_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted\n",
"name": "message_ids"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "deletechatphoto",
"name": "deleteChatPhoto",
"description": "Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.",
"html_description": "<p>Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "deletechatstickerset",
"name": "deleteChatStickerSet",
"description": "Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.",
"html_description": "<p>Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field <em>can_set_sticker_set</em> optionally returned in <a href=\"#getchat\">getChat</a> requests to check if the bot can use this method. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n",
"name": "chat_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "deleteforumtopic",
"name": "deleteForumTopic",
"description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.",
"html_description": "<p>Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the <em>can_delete_messages</em> administrator rights. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target message thread of the forum topic",
"html_description": "<td>Unique identifier for the target message thread of the forum topic</td>",
"rst_description": "Unique identifier for the target message thread of the forum topic\n",
"name": "message_thread_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "deletemessage",
"name": "deleteMessage",
"description": "Use this method to delete a message, including service messages, with the following limitations:\n- A message can only be deleted if it was sent less than 48 hours ago.\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n- Bots can delete incoming messages in private chats.\n- Bots granted can_post_messages permissions can delete outgoing messages in channels.\n- If the bot is an administrator of a group, it can delete any message there.\n- If the bot has can_delete_messages administrator right in a supergroup or a channel, it can delete any message there.\n- If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.\nReturns True on success.",
"html_description": "<p>Use this method to delete a message, including service messages, with the following limitations:<br/>\n- A message can only be deleted if it was sent less than 48 hours ago.<br/>\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.<br/>\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.<br/>\n- Bots can delete outgoing messages in private chats, groups, and supergroups.<br/>\n- Bots can delete incoming messages in private chats.<br/>\n- Bots granted <em>can_post_messages</em> permissions can delete outgoing messages in channels.<br/>\n- If the bot is an administrator of a group, it can delete any message there.<br/>\n- If the bot has <em>can_delete_messages</em> administrator right in a supergroup or a channel, it can delete any message there.<br/>\n- If the bot has <em>can_manage_direct_messages</em> administrator right in a channel, it can delete any message in the corresponding direct messages chat.<br/>\nReturns <em>True</em> on success.</p>",
"rst_description": "Use this method to delete a message, including service messages, with the following limitations:\n\n- A message can only be deleted if it was sent less than 48 hours ago.\n\n- Service messages about a supergroup, channel, or forum topic creation can't be deleted.\n\n- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.\n\n- Bots can delete outgoing messages in private chats, groups, and supergroups.\n\n- Bots can delete incoming messages in private chats.\n\n- Bots granted *can_post_messages* permissions can delete outgoing messages in channels.\n\n- If the bot is an administrator of a group, it can delete any message there.\n\n- If the bot has *can_delete_messages* administrator right in a supergroup or a channel, it can delete any message there.\n\n- If the bot has *can_manage_direct_messages* administrator right in a channel, it can delete any message in the corresponding direct messages chat.\n\nReturns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Identifier of the message to delete",
"html_description": "<td>Identifier of the message to delete</td>",
"rst_description": "Identifier of the message to delete\n",
"name": "message_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "deletemessages",
"name": "deleteMessages",
"description": "Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success.",
"html_description": "<p>Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Array of Integer",
"required": true,
"description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted",
"html_description": "<td>A JSON-serialized list of 1-100 identifiers of messages to delete. See <a href=\"#deletemessage\">deleteMessage</a> for limitations on which messages can be deleted</td>",
"rst_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted\n",
"name": "message_ids"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "deletemycommands",
"name": "deleteMyCommands",
"description": "Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.",
"html_description": "<p>Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, <a href=\"#determining-list-of-commands\">higher level commands</a> will be shown to affected users. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, `higher level commands <https://core.telegram.org/bots/api#determining-list-of-commands>`_ will be shown to affected users. Returns :code:`True` on success.",
"annotations": [
{
"type": "BotCommandScope",
"required": false,
"description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.",
"html_description": "<td>A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to <a href=\"#botcommandscopedefault\">BotCommandScopeDefault</a>.</td>",
"rst_description": "A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.\n",
"name": "scope"
},
{
"type": "String",
"required": false,
"description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands",
"html_description": "<td>A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands</td>",
"rst_description": "A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands\n",
"name": "language_code"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "deletestickerfromset",
"name": "deleteStickerFromSet",
"description": "Use this method to delete a sticker from a set created by the bot. Returns True on success.",
"html_description": "<p>Use this method to delete a sticker from a set created by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "File identifier of the sticker",
"html_description": "<td>File identifier of the sticker</td>",
"rst_description": "File identifier of the sticker\n",
"name": "sticker"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Stickers",
"anchor": "stickers"
},
"object": {
"anchor": "deletestickerset",
"name": "deleteStickerSet",
"description": "Use this method to delete a sticker set that was created by the bot. Returns True on success.",
"html_description": "<p>Use this method to delete a sticker set that was created by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to delete a sticker set that was created by the bot. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Sticker set name",
"html_description": "<td>Sticker set name</td>",
"rst_description": "Sticker set name\n",
"name": "name"
}
],
"category": "methods"
}
}

33
.butcher/methods/deleteStory/entity.json generated Normal file
View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "deletestory",
"name": "deleteStory",
"description": "Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success.",
"html_description": "<p>Deletes a story previously posted by the bot on behalf of a managed business account. Requires the <em>can_manage_stories</em> business bot right. Returns <em>True</em> on success.</p>",
"rst_description": "Deletes a story previously posted by the bot on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :code:`True` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier of the business connection",
"html_description": "<td>Unique identifier of the business connection</td>",
"rst_description": "Unique identifier of the business connection\n",
"name": "business_connection_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier of the story to delete",
"html_description": "<td>Unique identifier of the story to delete</td>",
"rst_description": "Unique identifier of the story to delete\n",
"name": "story_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Getting updates",
"anchor": "getting-updates"
},
"object": {
"anchor": "deletewebhook",
"name": "deleteWebhook",
"description": "Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.",
"html_description": "<p>Use this method to remove webhook integration if you decide to switch back to <a href=\"#getupdates\">getUpdates</a>. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to remove webhook integration if you decide to switch back to :class:`aiogram.methods.get_updates.GetUpdates`. Returns :code:`True` on success.",
"annotations": [
{
"type": "Boolean",
"required": false,
"description": "Pass True to drop all pending updates",
"html_description": "<td>Pass <em>True</em> to drop all pending updates</td>",
"rst_description": "Pass :code:`True` to drop all pending updates\n",
"name": "drop_pending_updates"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,65 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "editchatinvitelink",
"name": "editChatInviteLink",
"description": "Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.",
"html_description": "<p>Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a <a href=\"#chatinvitelink\">ChatInviteLink</a> object.</p>",
"rst_description": "Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "String",
"required": true,
"description": "The invite link to edit",
"html_description": "<td>The invite link to edit</td>",
"rst_description": "The invite link to edit\n",
"name": "invite_link"
},
{
"type": "String",
"required": false,
"description": "Invite link name; 0-32 characters",
"html_description": "<td>Invite link name; 0-32 characters</td>",
"rst_description": "Invite link name; 0-32 characters\n",
"name": "name"
},
{
"type": "Integer",
"required": false,
"description": "Point in time (Unix timestamp) when the link will expire",
"html_description": "<td>Point in time (Unix timestamp) when the link will expire</td>",
"rst_description": "Point in time (Unix timestamp) when the link will expire\n",
"name": "expire_date"
},
{
"type": "Integer",
"required": false,
"description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999",
"html_description": "<td>The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999</td>",
"rst_description": "The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999\n",
"name": "member_limit"
},
{
"type": "Boolean",
"required": false,
"description": "True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified",
"html_description": "<td><em>True</em>, if users joining the chat via the link need to be approved by chat administrators. If <em>True</em>, <em>member_limit</em> can't be specified</td>",
"rst_description": ":code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified\n",
"name": "creates_join_request"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,11 @@
annotations:
expire_date:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "editchatsubscriptioninvitelink",
"name": "editChatSubscriptionInviteLink",
"description": "Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.",
"html_description": "<p>Use this method to edit a subscription invite link created by the bot. The bot must have the <em>can_invite_users</em> administrator rights. Returns the edited invite link as a <a href=\"#chatinvitelink\">ChatInviteLink</a> object.</p>",
"rst_description": "Use this method to edit a subscription invite link created by the bot. The bot must have the *can_invite_users* administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "String",
"required": true,
"description": "The invite link to edit",
"html_description": "<td>The invite link to edit</td>",
"rst_description": "The invite link to edit\n",
"name": "invite_link"
},
{
"type": "String",
"required": false,
"description": "Invite link name; 0-32 characters",
"html_description": "<td>Invite link name; 0-32 characters</td>",
"rst_description": "Invite link name; 0-32 characters\n",
"name": "name"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "editforumtopic",
"name": "editForumTopic",
"description": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.",
"html_description": "<p>Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target message thread of the forum topic",
"html_description": "<td>Unique identifier for the target message thread of the forum topic</td>",
"rst_description": "Unique identifier for the target message thread of the forum topic\n",
"name": "message_thread_id"
},
{
"type": "String",
"required": false,
"description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept",
"html_description": "<td>New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept</td>",
"rst_description": "New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept\n",
"name": "name"
},
{
"type": "String",
"required": false,
"description": "New unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept",
"html_description": "<td>New unique identifier of the custom emoji shown as the topic icon. Use <a href=\"#getforumtopiciconstickers\">getForumTopicIconStickers</a> to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept</td>",
"rst_description": "New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept\n",
"name": "icon_custom_emoji_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "editgeneralforumtopic",
"name": "editGeneralForumTopic",
"description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.",
"html_description": "<p>Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n",
"name": "chat_id"
},
{
"type": "String",
"required": true,
"description": "New topic name, 1-128 characters",
"html_description": "<td>New topic name, 1-128 characters</td>",
"rst_description": "New topic name, 1-128 characters\n",
"name": "name"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,2 @@
parse_mode: parse_mode
show_caption_above_media: show_caption_above_media

View file

@ -0,0 +1,89 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "editmessagecaption",
"name": "editMessageCaption",
"description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.",
"html_description": "<p>Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>",
"rst_description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": false,
"description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": false,
"description": "Required if inline_message_id is not specified. Identifier of the message to edit",
"html_description": "<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message to edit</td>",
"rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n",
"name": "message_id"
},
{
"type": "String",
"required": false,
"description": "Required if chat_id and message_id are not specified. Identifier of the inline message",
"html_description": "<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>",
"rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n",
"name": "inline_message_id"
},
{
"type": "String",
"required": false,
"description": "New caption of the message, 0-1024 characters after entities parsing",
"html_description": "<td>New caption of the message, 0-1024 characters after entities parsing</td>",
"rst_description": "New caption of the message, 0-1024 characters after entities parsing\n",
"name": "caption"
},
{
"type": "String",
"required": false,
"description": "Mode for parsing entities in the message caption. See formatting options for more details.",
"html_description": "<td>Mode for parsing entities in the message caption. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "Mode for parsing entities in the message caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"name": "parse_mode"
},
{
"type": "Array of MessageEntity",
"required": false,
"description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode",
"html_description": "<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>",
"rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n",
"name": "caption_entities"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.",
"html_description": "<td>Pass <em>True</em>, if the caption must be shown above the message media. Supported only for animation, photo and video messages.</td>",
"rst_description": "Pass :code:`True`, if the caption must be shown above the message media. Supported only for animation, photo and video messages.\n",
"name": "show_caption_above_media"
},
{
"type": "InlineKeyboardMarkup",
"required": false,
"description": "A JSON-serialized object for an inline keyboard.",
"html_description": "<td>A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>.</td>",
"rst_description": "A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_.\n",
"name": "reply_markup"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,57 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "editmessagechecklist",
"name": "editMessageChecklist",
"description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.",
"html_description": "<p>Use this method to edit a checklist on behalf of a connected business account. On success, the edited <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target chat",
"html_description": "<td>Unique identifier for the target chat</td>",
"rst_description": "Unique identifier for the target chat\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier for the target message",
"html_description": "<td>Unique identifier for the target message</td>",
"rst_description": "Unique identifier for the target message\n",
"name": "message_id"
},
{
"type": "InputChecklist",
"required": true,
"description": "A JSON-serialized object for the new checklist",
"html_description": "<td>A JSON-serialized object for the new checklist</td>",
"rst_description": "A JSON-serialized object for the new checklist\n",
"name": "checklist"
},
{
"type": "InlineKeyboardMarkup",
"required": false,
"description": "A JSON-serialized object for the new inline keyboard for the message",
"html_description": "<td>A JSON-serialized object for the new <a href=\"/bots/features#inline-keyboards\">inline keyboard</a> for the message</td>",
"rst_description": "A JSON-serialized object for the new `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_ for the message\n",
"name": "reply_markup"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,105 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "editmessagelivelocation",
"name": "editMessageLiveLocation",
"description": "Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.",
"html_description": "<p>Use this method to edit live location messages. A location can be edited until its <em>live_period</em> expires or editing is explicitly disabled by a call to <a href=\"#stopmessagelivelocation\">stopMessageLiveLocation</a>. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned.</p>",
"rst_description": "Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": false,
"description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": false,
"description": "Required if inline_message_id is not specified. Identifier of the message to edit",
"html_description": "<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message to edit</td>",
"rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n",
"name": "message_id"
},
{
"type": "String",
"required": false,
"description": "Required if chat_id and message_id are not specified. Identifier of the inline message",
"html_description": "<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>",
"rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n",
"name": "inline_message_id"
},
{
"type": "Float",
"required": true,
"description": "Latitude of new location",
"html_description": "<td>Latitude of new location</td>",
"rst_description": "Latitude of new location\n",
"name": "latitude"
},
{
"type": "Float",
"required": true,
"description": "Longitude of new location",
"html_description": "<td>Longitude of new location</td>",
"rst_description": "Longitude of new location\n",
"name": "longitude"
},
{
"type": "Integer",
"required": false,
"description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged",
"html_description": "<td>New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current <em>live_period</em> by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then <em>live_period</em> remains unchanged</td>",
"rst_description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current *live_period* by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then *live_period* remains unchanged\n",
"name": "live_period"
},
{
"type": "Float",
"required": false,
"description": "The radius of uncertainty for the location, measured in meters; 0-1500",
"html_description": "<td>The radius of uncertainty for the location, measured in meters; 0-1500</td>",
"rst_description": "The radius of uncertainty for the location, measured in meters; 0-1500\n",
"name": "horizontal_accuracy"
},
{
"type": "Integer",
"required": false,
"description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.",
"html_description": "<td>Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.</td>",
"rst_description": "Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.\n",
"name": "heading"
},
{
"type": "Integer",
"required": false,
"description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.",
"html_description": "<td>The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.</td>",
"rst_description": "The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.\n",
"name": "proximity_alert_radius"
},
{
"type": "InlineKeyboardMarkup",
"required": false,
"description": "A JSON-serialized object for a new inline keyboard.",
"html_description": "<td>A JSON-serialized object for a new <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>.</td>",
"rst_description": "A JSON-serialized object for a new `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_.\n",
"name": "reply_markup"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,65 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "editmessagemedia",
"name": "editMessageMedia",
"description": "Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.",
"html_description": "<p>Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>",
"rst_description": "Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": false,
"description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": false,
"description": "Required if inline_message_id is not specified. Identifier of the message to edit",
"html_description": "<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message to edit</td>",
"rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n",
"name": "message_id"
},
{
"type": "String",
"required": false,
"description": "Required if chat_id and message_id are not specified. Identifier of the inline message",
"html_description": "<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>",
"rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n",
"name": "inline_message_id"
},
{
"type": "InputMedia",
"required": true,
"description": "A JSON-serialized object for a new media content of the message",
"html_description": "<td>A JSON-serialized object for a new media content of the message</td>",
"rst_description": "A JSON-serialized object for a new media content of the message\n",
"name": "media"
},
{
"type": "InlineKeyboardMarkup",
"required": false,
"description": "A JSON-serialized object for a new inline keyboard.",
"html_description": "<td>A JSON-serialized object for a new <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>.</td>",
"rst_description": "A JSON-serialized object for a new `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_.\n",
"name": "reply_markup"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,57 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "editmessagereplymarkup",
"name": "editMessageReplyMarkup",
"description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.",
"html_description": "<p>Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>",
"rst_description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": false,
"description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": false,
"description": "Required if inline_message_id is not specified. Identifier of the message to edit",
"html_description": "<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message to edit</td>",
"rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n",
"name": "message_id"
},
{
"type": "String",
"required": false,
"description": "Required if chat_id and message_id are not specified. Identifier of the inline message",
"html_description": "<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>",
"rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n",
"name": "inline_message_id"
},
{
"type": "InlineKeyboardMarkup",
"required": false,
"description": "A JSON-serialized object for an inline keyboard.",
"html_description": "<td>A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>.</td>",
"rst_description": "A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_.\n",
"name": "reply_markup"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,3 @@
disable_web_page_preview: link_preview_is_disabled
link_preview_options: link_preview
parse_mode: parse_mode

View file

@ -0,0 +1,101 @@
{
"meta": {},
"group": {
"title": "Updating messages",
"anchor": "updating-messages"
},
"object": {
"anchor": "editmessagetext",
"name": "editMessageText",
"description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.",
"html_description": "<p>Use this method to edit text and <a href=\"#games\">game</a> messages. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>",
"rst_description": "Use this method to edit text and `game <https://core.telegram.org/bots/api#games>`_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": false,
"description": "Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": false,
"description": "Required if inline_message_id is not specified. Identifier of the message to edit",
"html_description": "<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message to edit</td>",
"rst_description": "Required if *inline_message_id* is not specified. Identifier of the message to edit\n",
"name": "message_id"
},
{
"type": "String",
"required": false,
"description": "Required if chat_id and message_id are not specified. Identifier of the inline message",
"html_description": "<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>",
"rst_description": "Required if *chat_id* and *message_id* are not specified. Identifier of the inline message\n",
"name": "inline_message_id"
},
{
"type": "String",
"required": true,
"description": "New text of the message, 1-4096 characters after entities parsing",
"html_description": "<td>New text of the message, 1-4096 characters after entities parsing</td>",
"rst_description": "New text of the message, 1-4096 characters after entities parsing\n",
"name": "text"
},
{
"type": "String",
"required": false,
"description": "Mode for parsing entities in the message text. See formatting options for more details.",
"html_description": "<td>Mode for parsing entities in the message text. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"name": "parse_mode"
},
{
"type": "Array of MessageEntity",
"required": false,
"description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode",
"html_description": "<td>A JSON-serialized list of special entities that appear in message text, which can be specified instead of <em>parse_mode</em></td>",
"rst_description": "A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*\n",
"name": "entities"
},
{
"type": "LinkPreviewOptions",
"required": false,
"description": "Link preview generation options for the message",
"html_description": "<td>Link preview generation options for the message</td>",
"rst_description": "Link preview generation options for the message\n",
"name": "link_preview_options"
},
{
"type": "InlineKeyboardMarkup",
"required": false,
"description": "A JSON-serialized object for an inline keyboard.",
"html_description": "<td>A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>.</td>",
"rst_description": "A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_.\n",
"name": "reply_markup"
},
{
"type": "Boolean",
"required": false,
"description": "Disables link previews for links in this message",
"html_description": "<td>Disables link previews for links in this message</td>",
"rst_description": "Disables link previews for links in this message\n",
"name": "disable_web_page_preview",
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
}
],
"category": "methods"
}
}

73
.butcher/methods/editStory/entity.json generated Normal file
View file

@ -0,0 +1,73 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "editstory",
"name": "editStory",
"description": "Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.",
"html_description": "<p>Edits a story previously posted by the bot on behalf of a managed business account. Requires the <em>can_manage_stories</em> business bot right. Returns <a href=\"#story\">Story</a> on success.</p>",
"rst_description": "Edits a story previously posted by the bot on behalf of a managed business account. Requires the *can_manage_stories* business bot right. Returns :class:`aiogram.types.story.Story` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier of the business connection",
"html_description": "<td>Unique identifier of the business connection</td>",
"rst_description": "Unique identifier of the business connection\n",
"name": "business_connection_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier of the story to edit",
"html_description": "<td>Unique identifier of the story to edit</td>",
"rst_description": "Unique identifier of the story to edit\n",
"name": "story_id"
},
{
"type": "InputStoryContent",
"required": true,
"description": "Content of the story",
"html_description": "<td>Content of the story</td>",
"rst_description": "Content of the story\n",
"name": "content"
},
{
"type": "String",
"required": false,
"description": "Caption of the story, 0-2048 characters after entities parsing",
"html_description": "<td>Caption of the story, 0-2048 characters after entities parsing</td>",
"rst_description": "Caption of the story, 0-2048 characters after entities parsing\n",
"name": "caption"
},
{
"type": "String",
"required": false,
"description": "Mode for parsing entities in the story caption. See formatting options for more details.",
"html_description": "<td>Mode for parsing entities in the story caption. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "Mode for parsing entities in the story caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"name": "parse_mode"
},
{
"type": "Array of MessageEntity",
"required": false,
"description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode",
"html_description": "<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>",
"rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n",
"name": "caption_entities"
},
{
"type": "Array of StoryArea",
"required": false,
"description": "A JSON-serialized list of clickable areas to be shown on the story",
"html_description": "<td>A JSON-serialized list of clickable areas to be shown on the story</td>",
"rst_description": "A JSON-serialized list of clickable areas to be shown on the story\n",
"name": "areas"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "edituserstarsubscription",
"name": "editUserStarSubscription",
"description": "Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.",
"html_description": "<p>Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns <em>True</em> on success.</p>",
"rst_description": "Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",
"required": true,
"description": "Identifier of the user whose subscription will be edited",
"html_description": "<td>Identifier of the user whose subscription will be edited</td>",
"rst_description": "Identifier of the user whose subscription will be edited\n",
"name": "user_id"
},
{
"type": "String",
"required": true,
"description": "Telegram payment identifier for the subscription",
"html_description": "<td>Telegram payment identifier for the subscription</td>",
"rst_description": "Telegram payment identifier for the subscription\n",
"name": "telegram_payment_charge_id"
},
{
"type": "Boolean",
"required": true,
"description": "Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.",
"html_description": "<td>Pass <em>True</em> to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass <em>False</em> to allow the user to re-enable a subscription that was previously canceled by the bot.</td>",
"rst_description": "Pass :code:`True` to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass :code:`False` to allow the user to re-enable a subscription that was previously canceled by the bot.\n",
"name": "is_canceled"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "exportchatinvitelink",
"name": "exportChatInviteLink",
"description": "Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.\nNote: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.",
"html_description": "<p>Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as <em>String</em> on success.</p><blockquote>\n<p>Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using <a href=\"#exportchatinvitelink\">exportChatInviteLink</a> or by calling the <a href=\"#getchat\">getChat</a> method. If your bot needs to generate a new primary invite link replacing its previous one, use <a href=\"#exportchatinvitelink\">exportChatInviteLink</a> again.</p>\n</blockquote>",
"rst_description": "Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as *String* on success.\n\n Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1 @@
protect_content: protect_content

View file

@ -0,0 +1,97 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "forwardmessage",
"name": "forwardMessage",
"description": "Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned.",
"html_description": "<p>Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": false,
"description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
"html_description": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)",
"html_description": "<td>Unique identifier for the chat where the original message was sent (or channel username in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n",
"name": "from_chat_id"
},
{
"type": "Integer",
"required": false,
"description": "New start timestamp for the forwarded video in the message",
"html_description": "<td>New start timestamp for the forwarded video in the message</td>",
"rst_description": "New start timestamp for the forwarded video in the message\n",
"name": "video_start_timestamp"
},
{
"type": "Boolean",
"required": false,
"description": "Sends the message silently. Users will receive a notification with no sound.",
"html_description": "<td>Sends the message <a href=\"https://telegram.org/blog/channels-2-0#silent-messages\">silently</a>. Users will receive a notification with no sound.</td>",
"rst_description": "Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.\n",
"name": "disable_notification"
},
{
"type": "Boolean",
"required": false,
"description": "Protects the contents of the forwarded message from forwarding and saving",
"html_description": "<td>Protects the contents of the forwarded message from forwarding and saving</td>",
"rst_description": "Protects the contents of the forwarded message from forwarding and saving\n",
"name": "protect_content"
},
{
"type": "String",
"required": false,
"description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats",
"html_description": "<td>Unique identifier of the message effect to be added to the message; only available when forwarding to private chats</td>",
"rst_description": "Unique identifier of the message effect to be added to the message; only available when forwarding to private chats\n",
"name": "message_effect_id"
},
{
"type": "SuggestedPostParameters",
"required": false,
"description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only",
"html_description": "<td>A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only</td>",
"rst_description": "A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only\n",
"name": "suggested_post_parameters"
},
{
"type": "Integer",
"required": true,
"description": "Message identifier in the chat specified in from_chat_id",
"html_description": "<td>Message identifier in the chat specified in <em>from_chat_id</em></td>",
"rst_description": "Message identifier in the chat specified in *from_chat_id*\n",
"name": "message_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,11 @@
annotations:
video_start_timestamp:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -0,0 +1,73 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "forwardmessages",
"name": "forwardMessages",
"description": "Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned.",
"html_description": "<p>Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of <a href=\"#messageid\">MessageId</a> of the sent messages is returned.</p>",
"rst_description": "Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": false,
"description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only",
"html_description": "<td>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</td>",
"rst_description": "Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only\n",
"name": "message_thread_id"
},
{
"type": "Integer",
"required": false,
"description": "Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat",
"html_description": "<td>Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat</td>",
"rst_description": "Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat\n",
"name": "direct_messages_topic_id"
},
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)",
"html_description": "<td>Unique identifier for the chat where the original messages were sent (or channel username in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)\n",
"name": "from_chat_id"
},
{
"type": "Array of Integer",
"required": true,
"description": "A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.",
"html_description": "<td>A JSON-serialized list of 1-100 identifiers of messages in the chat <em>from_chat_id</em> to forward. The identifiers must be specified in a strictly increasing order.</td>",
"rst_description": "A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order.\n",
"name": "message_ids"
},
{
"type": "Boolean",
"required": false,
"description": "Sends the messages silently. Users will receive a notification with no sound.",
"html_description": "<td>Sends the messages <a href=\"https://telegram.org/blog/channels-2-0#silent-messages\">silently</a>. Users will receive a notification with no sound.</td>",
"rst_description": "Sends the messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.\n",
"name": "disable_notification"
},
{
"type": "Boolean",
"required": false,
"description": "Protects the contents of the forwarded messages from forwarding and saving",
"html_description": "<td>Protects the contents of the forwarded messages from forwarding and saving</td>",
"rst_description": "Protects the contents of the forwarded messages from forwarding and saving\n",
"name": "protect_content"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,16 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "getavailablegifts",
"name": "getAvailableGifts",
"description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.",
"html_description": "<p>Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a <a href=\"#gifts\">Gifts</a> object.</p>",
"rst_description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object.",
"annotations": [],
"category": "methods"
}
}

View file

@ -0,0 +1,117 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "getbusinessaccountgifts",
"name": "getBusinessAccountGifts",
"description": "Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns OwnedGifts on success.",
"html_description": "<p>Returns the gifts received and owned by a managed business account. Requires the <em>can_view_gifts_and_stars</em> business bot right. Returns <a href=\"#ownedgifts\">OwnedGifts</a> on success.</p>",
"rst_description": "Returns the gifts received and owned by a managed business account. Requires the *can_view_gifts_and_stars* business bot right. Returns :class:`aiogram.types.owned_gifts.OwnedGifts` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier of the business connection",
"html_description": "<td>Unique identifier of the business connection</td>",
"rst_description": "Unique identifier of the business connection\n",
"name": "business_connection_id"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that aren't saved to the account's profile page",
"html_description": "<td>Pass <em>True</em> to exclude gifts that aren't saved to the account's profile page</td>",
"rst_description": "Pass :code:`True` to exclude gifts that aren't saved to the account's profile page\n",
"name": "exclude_unsaved"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that are saved to the account's profile page",
"html_description": "<td>Pass <em>True</em> to exclude gifts that are saved to the account's profile page</td>",
"rst_description": "Pass :code:`True` to exclude gifts that are saved to the account's profile page\n",
"name": "exclude_saved"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that can be purchased an unlimited number of times",
"html_description": "<td>Pass <em>True</em> to exclude gifts that can be purchased an unlimited number of times</td>",
"rst_description": "Pass :code:`True` to exclude gifts that can be purchased an unlimited number of times\n",
"name": "exclude_unlimited"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique",
"html_description": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times and can be upgraded to unique</td>",
"rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can be upgraded to unique\n",
"name": "exclude_limited_upgradable"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique",
"html_description": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique</td>",
"rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique\n",
"name": "exclude_limited_non_upgradable"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude unique gifts",
"html_description": "<td>Pass <em>True</em> to exclude unique gifts</td>",
"rst_description": "Pass :code:`True` to exclude unique gifts\n",
"name": "exclude_unique"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram",
"html_description": "<td>Pass <em>True</em> to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram</td>",
"rst_description": "Pass :code:`True` to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram\n",
"name": "exclude_from_blockchain"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.",
"html_description": "<td>Pass <em>True</em> to sort results by gift price instead of send date. Sorting is applied before pagination.</td>",
"rst_description": "Pass :code:`True` to sort results by gift price instead of send date. Sorting is applied before pagination.\n",
"name": "sort_by_price"
},
{
"type": "String",
"required": false,
"description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results",
"html_description": "<td>Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results</td>",
"rst_description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results\n",
"name": "offset"
},
{
"type": "Integer",
"required": false,
"description": "The maximum number of gifts to be returned; 1-100. Defaults to 100",
"html_description": "<td>The maximum number of gifts to be returned; 1-100. Defaults to 100</td>",
"rst_description": "The maximum number of gifts to be returned; 1-100. Defaults to 100\n",
"name": "limit"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True to exclude gifts that can be purchased a limited number of times",
"html_description": "<td>Pass <em>True</em> to exclude gifts that can be purchased a limited number of times</td>",
"rst_description": "Pass :code:`True` to exclude gifts that can be purchased a limited number of times\n",
"name": "exclude_limited",
"deprecated": {
"version": "9.3",
"release_date": "2025-12-31"
}
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "getbusinessaccountstarbalance",
"name": "getBusinessAccountStarBalance",
"description": "Returns the amount of Telegram Stars owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns StarAmount on success.",
"html_description": "<p>Returns the amount of Telegram Stars owned by a managed business account. Requires the <em>can_view_gifts_and_stars</em> business bot right. Returns <a href=\"#staramount\">StarAmount</a> on success.</p>",
"rst_description": "Returns the amount of Telegram Stars owned by a managed business account. Requires the *can_view_gifts_and_stars* business bot right. Returns :class:`aiogram.types.star_amount.StarAmount` on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier of the business connection",
"html_description": "<td>Unique identifier of the business connection</td>",
"rst_description": "Unique identifier of the business connection\n",
"name": "business_connection_id"
}
],
"category": "methods"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "getbusinessconnection",
"name": "getBusinessConnection",
"description": "Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.",
"html_description": "<p>Use this method to get information about the connection of the bot with a business account. Returns a <a href=\"#businessconnection\">BusinessConnection</a> object on success.</p>",
"rst_description": "Use this method to get information about the connection of the bot with a business account. Returns a :class:`aiogram.types.business_connection.BusinessConnection` object on success.",
"annotations": [
{
"type": "String",
"required": true,
"description": "Unique identifier of the business connection",
"html_description": "<td>Unique identifier of the business connection</td>",
"rst_description": "Unique identifier of the business connection\n",
"name": "business_connection_id"
}
],
"category": "methods"
}
}

25
.butcher/methods/getChat/entity.json generated Normal file
View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "getchat",
"name": "getChat",
"description": "Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success.",
"html_description": "<p>Use this method to get up-to-date information about the chat. Returns a <a href=\"#chatfullinfo\">ChatFullInfo</a> object on success.</p>",
"rst_description": "Use this method to get up-to-date information about the chat. Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup or channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)\n",
"name": "chat_id"
}
],
"category": "methods"
}
}

Some files were not shown because too many files have changed in this diff Show more