Commit graph

295 commits

Author SHA1 Message Date
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
53e5abbdee
Bump changelog 2023-07-30 20:51:29 +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
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
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
ea0ecbcd50
Render changelog 2023-07-17 23:02:10 +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
6044a73e55
Small changes in the changelog 2023-07-17 02:56:35 +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
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
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
caba07a529 update changelog 2023-06-02 10:17:39 +03:00
latan
e955d7cb3b add towncrier file for a feature 2023-05-23 13:24:29 +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
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
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
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
RootShinobi
dbaf6fabcb
storage cleanup (#1144)
* storage cleanup

* storage cleanup
2023-04-08 18:01:11 +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
Ł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
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
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
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
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
58868ec627
Added possibility to reply into webhook with files (#1120) 2023-02-12 02:00:42 +02:00