Commit graph

1918 commits

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