Commit graph

1530 commits

Author SHA1 Message Date
JWSong
7cce8b6397
Removed redundant definitions (#531)
This closes #456.

Co-authored-by: Jungwoo Song <jungwoo.song1@gmail.com>
2021-03-20 19:51:32 +02:00
Alex Root Junior
b287a9f5f5
Update FUNDING.yml 2021-03-20 19:37:39 +02:00
Aleksandr
901270449f
Changed ChatType from CHANNEL to SUPERGROUP to avoid confusion (#533)
Channels require a separate channel_post_handler, so this example is currently broken and confusing
2021-03-20 19:23:30 +02:00
Oleg A
c153d681fb
fix: add Chat.message_auto_delete_time field (#535) 2021-03-20 16:49:17 +02:00
Aleksandr
5715e4466f
Added alias to from_user field, fixed TypeError (#527) 2021-03-17 14:28:42 +02:00
Alex Root Junior
cce3a5fbd0 Bump badge 2021-03-14 21:36:18 +02:00
monte-monte
8612a64b3c
Update builtin.py (#510)
* Update builtin.py

In StateFilter check if object is CallbackQuery because it has different structure compared to simple message. This change prevents https://github.com/aiogram/aiogram/issues/508 bug.

* Update aiogram/dispatcher/filters/builtin.py

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2021-03-14 20:40:52 +02:00
Stefan
6c423d2b92
Update safe_split_text function, added split_separator param (#515)
Co-authored-by: Stefan Vasilenko <sv@nuts-agency.ru>
2021-03-14 20:39:29 +02:00
Alex Root Junior
76955bf8f1 Fixed optional arguments in new methods (API 5.1) 2021-03-14 20:17:40 +02:00
Alex Root Junior
cd047e8d01 Removed deprecation warning from Message.send_copy 2021-03-14 18:27:38 +02:00
Egor
b2b7ddb639
feat: an example of intergration between externally created Application and dispatcher (#433)
* feat: an example of intergration between externally created Application and dispatcher

* fix: imports

* chore: fix EOF

* chore: fix comment
2021-03-14 18:20:37 +02:00
Andrew
9bb3a5dccf
ADD Exceptions: (#512)
* CantRestrictChatOwner
* UserIsAnAdministratorOfTheChat
2021-03-14 18:14:40 +02:00
Daniil Kovalenko
5254329c2b
Fix types.MediaGroup methods (#514) 2021-03-14 18:13:57 +02:00
Fenicu
d9de799479
Add new types in message.send_copy method (#511) 2021-03-14 18:11:48 +02:00
darksidecat
5b1bed7942
fix bug in getting user_id, chat_id from context (#520)
* fix bug in getting user_id, chat_id from context (need User.id for future use, not User object)

* requested changes: get current() can return None

add check this case
2021-03-14 18:10:40 +02:00
Arseniy Kulikov
1354f8d58c
added answer_chat_action() method for types.Message (#501) 2021-03-14 18:06:55 +02:00
Oleg A
24fb07d3fe
Bot API 5.1 (#519)
* version update

* added ChatMemberUpdated class

* added ChatInviteLink class

* 2.x version update

* update types added

* added methods createChatInviteLink,  editChatInviteLink,  revokeChatInviteLink

* Voice Chat types added

* added Message fields: voice_chat_started, voice_chat_ended, voice_chat_participants_invited

* can_manage_voice_chats added

* chat links shortcuts added

* bowling dice support

* reordered ChatMembers params (no changes)

* Added can_manage_chat to the class ChatMember and parameter can_manage_chat to the method promoteChatMember

* kick_chat_member refactored + docs update

* Added the parameter revoke_messages to the method kickChatMember

* updated kick_chat_member shortcut for Chat

* Added the type MessageAutoDeleteTimerChanged and the field message_auto_delete_timer_changed to the class Message

* feat: add methods to register my_chat_member and chat_member handlers

* Updated filters for new event types

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2021-03-14 18:05:17 +02:00
Alex Root Junior
75222b8af0 #516: Fix updating chat 2021-03-07 15:27:41 +02:00
evgfilim1
9de257efec
Merge pull request #497 from TrDex/dev-2.x
Add ability to `.answer_*` and `.reply_*` live location
2021-02-20 06:48:05 +05:00
evgfilim1
675bd1c53f
Merge pull request #504 from luck20yan/patch-1
Update examples/chat_type_filter.py
2021-02-20 06:46:43 +05:00
Yan Khachko
c625b7beb0
Update chat_type_filter.py 2021-02-09 15:31:46 +00:00
Yan Khachko
4701b852bd
Update chat_type_filter.py 2021-02-09 11:38:51 +00:00
Mykola Solodukha
cd5a772110 Logically order args 2021-01-23 19:04:30 +02:00
nacknime
adba85c4be
docs(install): typo "form" -> "from" (#498) 2021-01-22 09:49:46 +02:00
Mykola Solodukha
8656c6bc24 Fix args order in .reply_* and .answer_location() 2021-01-15 05:12:32 +02:00
Mykola Solodukha
ad4b215e71 Add ability to .answer_* and .reply_* live location 2021-01-15 05:07:14 +02:00
Felix Yan
1349554dfd
Update installation instruction for Arch (#490)
* Update installation instruction for Arch

The package is now available in the official repository.

* Add pacman command example

* Add an additional empty line
2021-01-12 22:31:08 +02:00
Oleg A
ee12911f24
pytest update; yield_fixture deprecation fix; event_loop removed (#479) 2021-01-10 20:53:59 +02:00
Ibraheem Asaad
4fb4d6cac1
fix return value of FSMContextProxy's setdefault (#405) (#491) 2021-01-10 20:52:50 +02:00
Felix Yan
d7b1bd2dae
Correct a typo in executor.py (#489) 2021-01-10 20:49:48 +02:00
OGURCHINSKIY
3440ab3c96
Add exception MessageIdInvalid (#474) 2020-12-05 15:28:56 +02:00
SvineruS
ca45b248a8
Fixed optionality of some properties, add vcard argument to InputContactMessageContent constructor (#473) 2020-12-05 15:28:34 +02:00
Oleg A
b3103183d7
#467 Uncommented attach_document and attach_audio MediaGroup methods (#468) 2020-11-18 02:06:59 +02:00
Forden
2cf6b22a69
Update message.py (#466)
Added DICE to ContentTypes
2020-11-15 20:19:08 +02:00
Oleg A
ae7b250e33
fixed: Cannot send playlist of audio files (#465)
* fixed: Cannot send playlist of audio files #464

* #463 removed document and audio from check

* #463 style fix
2020-11-13 21:58:00 +02:00
Oleg A
ee3b0954a3
Telegram API readme updated (#463) 2020-11-12 22:02:52 +02:00
Alex Root Junior
2d32dcf444 Merge remote-tracking branch 'origin/dev-2.x' into dev-2.x 2020-11-10 09:57:49 +02:00
Alex Root Junior
f18f538b6f Hotfix: Default parse mode 2020-11-10 09:57:41 +02:00
Groosha
9c2c652df5
Added missing "supports_streaming" argument to answer_video method (#462) 2020-11-10 01:03:06 +02:00
Alex Root Junior
0158f99def Bump version 2020-11-10 00:40:05 +02:00
Oleg A
89e52ae18b
when entities are set, default parse_mode become disabled (#461)
* when entities are set, default parse_mode become disabled

* check entities is not None
2020-11-09 23:54:23 +02:00
Alex Root Junior
2bd6b63538 Merge remote-tracking branch 'origin/dev-2.x' into dev-2.x 2020-11-09 11:39:31 +02:00
Alex Root Junior
7f448b4d8e Fix files URL template 2020-11-09 11:39:19 +02:00
Igor
44c1cc1f61
Add parameter supports_streaming to reply_video, remove redundant docstrings (#459) 2020-11-08 23:59:16 +02:00
Daniil Kovalenko
c6a43c89c4
Add missing parameter to promoteChatMember alias (#458)
is_anonymous exists in the full method but is missing in its shortcut.
2020-11-08 20:35:09 +02:00
Alex Root Junior
d0bfa8a13b Fix MessageEntity serialization for API calls #457 2020-11-08 18:58:06 +02:00
Alex Root Junior
b170bbc5f6 Fix tests 2020-11-08 17:57:02 +02:00
Alex Root Junior
9a27b79d40 Bump version 2020-11-08 17:54:22 +02:00
Oleg A
2b060d9ad4
Bot API 5.0 (#454)
* increased Telegram Bot API version

* AIOG-T-64 added logOut method

* AIOG-T-64 added logOut method test

* AIOG-T-64 logOut type annotation fix

* AIOG-T-65 added close (close_bot) method

* AIOG-T-65 old `close` method deprecation warn

* AIOG-T-65 `close_bot` test added

* AIOG-T-67 added ip_address param to set_webhook, updated docs

* updated deprecation text

Co-authored-by: Martin Winks <mpa@snejugal.ru>

* AIOG-T-69 param `drop_pending_updates` added in methods `setWebhook` and `deleteWebhook`

* AIOG-T-71 new `ChatLocation` class

* AIOG-T-70 updated `Chat` class: bio, linked chats, location

* AIOG-T-68 field `ip_address` added to class `WebhookInfo`

* AIOG-T-72 param `only_if_banned` added to `unbanChatMember` method

* AIOG-T-72 updated Chat.unban shortcut

* AIOG-T-73 field `file_name` added to `Audio` and `Video` classes

* AIOG-T-74 param `disable_content_type_detection` added in `sendDocument` method and `InputMediaDocument` class

* AIOG-T-75 Added the ability to pin messages in private chats (docs update)

* AIOG-T-76 Added the parameter message_id to the method unpinChatMessage to allow unpinning of the specific pinned message

* AIOG-T-77 Added the method unpinAllChatMessages, which can be used to unpin all pinned messages in a chat.

* AIOG-T-78 updated send_media_group description; added media qty check

* AIOG-T-80 field `live_period` added to `Location` class

* AIOG-T-81 Added support for live location heading

* AIOG-T-82 added the field proximity_alert_distance to the classes Location, InlineQueryResultLocation, InputLocationMessageContent; fixed heading in InputLocationMessageContent

* AIOG-T-82 added parameter proximity_alert_distance to the methods sendLocation and editMessageLiveLocation

* AIOG-T-83 Added the type ProximityAlertTriggered

* AIOG-T-83 Added field proximity_alert_triggered to the class Message

* AIOG-T-84 Added the field horizontal_accuracy to the classes Location, InlineQueryResultLocation, InputLocationMessageContent

* AIOG-T-84 Added the parameter horizontal_accuracy to the methods sendLocation and editMessageLiveLocation.

* Added live_period to InputLocationMessageContent (missed?)

* AIOG-T-85 Added the field sender_chat to the class Message

* AIOG-T-86 Added `is_anonymous` field to `chatMember` class

* AIOG-T-87 Added the parameter is_anonymous to the method promoteChatMember

* AIOG-T-89 Added the method `copyMessage`

* AIOG-T-90 Poll docs update

* AIOG-T-91 ability to manually specify text entities

* AIOG-T-92 Google Places as a venue API provider

* AIOG-T-93 Added the field allow_sending_without_reply to the methods

* AIOG-T-94 football and slot machine dice

* removed Optional

Co-authored-by: Ramzan Bekbulatov <bekbulatov.ramzan@ya.ru>

* Apply suggestions from code review

removed Optional

Co-authored-by: Ramzan Bekbulatov <bekbulatov.ramzan@ya.ru>

* Don't use deprecated Bot.close method from dispatcher (Replaced by session.close)

* Fix copyMessage method, update alias (with deprecation)
Fix imports

* AIOG-T-79: Easy way to use custom API server

* Update docs

* Bump requirements

* Rollback email

* AIOG-T-93 allow_sending_without_reply to send_message shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_photo shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_video shortcuts

* Union[type, None] -> Optional[type] refactoring

* AIOG-T-93 added allow_sending_without_reply to send_animation shortcuts

* added type hint to reply field

* AIOG-T-93 added allow_sending_without_reply to send_audio shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_document shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_sticker shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_video_note shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_voice shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_location shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_venue shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_contact shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_poll shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_dice shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_media_group shortcuts

* AIOG-T-92 added google_place_ to send_venue shortcuts

* AIOG-T-91 added entities to send_message shortcuts

* AIOG-T-91 added caption_entities to send_photo shortcuts

* AIOG-T-91 added caption_entities to send_video shortcuts

* AIOG-T-91 added caption_entities to send_animation shortcuts

* AIOG-T-91 added caption_entities to send_audio shortcuts

* AIOG-T-91 added caption_entities to send_document shortcuts

* AIOG-T-91 added caption_entities to send_voice shortcuts

* AIOG-T-91 added explanation_parse_mode to send_poll shortcuts

* AIOG-T-91 added entities to edit_message_text shortcuts

* AIOG-T-91 added caption_entities to edit_message_caption shortcuts

* fixed types.MessageEntity -> MessageEntity in docs

Co-authored-by: Martin Winks <mpa@snejugal.ru>
Co-authored-by: Ramzan Bekbulatov <bekbulatov.ramzan@ya.ru>
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2020-11-08 17:51:39 +02:00
Groosha
8c43c209e0
Added SUPERGROUP chat type (#438)
* Added SUPERGROUP chat type, because SUPER_GROUP is incorrect and confusing.

* Added deprecation warning to SUPER_GROUP value
2020-11-08 17:46:28 +02:00