Commit graph

2026 commits

Author SHA1 Message Date
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