Commit graph

29 commits

Author SHA1 Message Date
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
d394af83bd
Update docs 2023-12-31 11:51:00 +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
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
Alex Root Junior
a355daba49
Re-generate Bot API 2023-10-29 02:15:50 +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
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
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
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
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
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
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
2a143edf56
Hide pydantic service attributes from models 2023-07-04 00:39:02 +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
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
2c756a1689
Update API docs 2023-04-08 18:31:38 +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
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
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
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 Root Junior
c5f3569471
Update from API docs 2023-01-07 22:41:36 +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
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
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