Commit graph

1918 commits

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