Commit graph

128 commits

Author SHA1 Message Date
Gabben
b545a5ff2e
Use hardcoded token as in the other examples (#809) 2022-01-26 23:25:40 +02:00
abdullaev388
2ece1ba140
Removed legacy code (markdown v1) (#771) 2021-12-09 01:52:54 +02:00
Fenicu
64393048dd
custom filter for filters_factory example (#688)
* custom filter for filters_factory example

* Shortened the code

* added new example of filter registration

* simplifying Filters and more handlers

* upgrade example

* black reformat
2021-11-07 02:49:31 +02:00
Alex Root Junior
b190bbba19
Dev 2.x api 5.4 (#741)
* Added support of Bot API 5.4

* Bump version

* Added aliases for ChatJoinRequest object

* Create aiohttp session inside async function

* Try to fix compatibility with aiohttp 3.8

* Fixed compatibility with Python 3.10
2021-11-07 01:39:51 +02:00
Oleg A
79c59b34f9
Fixed example description (#545) 2021-03-27 14:09:08 +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
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
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
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
Юрий
00202565e4
fixed type hints of callback_data (#400)
its impotant to remeber all data saved in callback_data is text even if you pass to it integer
insofar as newbies often copy examples and modyfy this typing may help them make no mistake
2020-09-13 22:09:43 +03:00
Oleg A
56ffa00c8c
I18n example patch (added docs and fixed typos) (#419)
* Update i18n example

1. Replaced one file translation to all project folder translation. It's more usable case. 
2. `For e.g.` --> `E.g.`. E.g. is short for `exempli gratia` which means simply “for example.” So if you write for e.g., you are in effect writing `for for example`. 
3. `xargs` replased with serveral lines, `xargs` is not appliable for Microsoft Windows users. 
4. Added info about translation tools. 
5. Minor edits.

* i18n middlaware typo fix

* i18n example header typo fix
2020-09-10 22:32:56 +03:00
Forden
22094eb477
Patch 1 (#398)
* Update callback_data_factory.py

* Update callback_data_factory_simple.py
2020-08-05 15:06:02 +03:00
Egor
81b36bd192
feat: add ChatType builtin filter (#356)
* feat: ChatTypesFilter

* feat: add example of usage

* feat: docs

* fix: add import in filters/__init__

* fix: remove some of event_handlers

* fix

* fix imports

* fix: rename to ChatTypeFilter

* fix: rename argument to chat_type

fix: rename example file name

fix: str is container also lol. example fixed also

* fix: respect type hints

* fix: add warning with respect to type hint

* fix: use warnings instead of logging
2020-07-02 14:17:48 +03:00
Egor
29aa4daf2c
Update i18n_example.py 2020-01-08 00:09:56 +05:00
Alex Root Junior
23325e09e3 #236 remove bad link 2020-01-01 16:44:49 +02:00
Alex Root Junior
18d1115b50 Replace .reply(reply=False) to .answer() in examples 2020-01-01 16:05:45 +02:00
JR Minnaar
1cdfa3e3c2 Fix all occurrences of adwanced in text 2019-09-12 10:33:24 +02:00
Rossouw Minnaar
a74efa311e Fix spelling 2019-09-09 11:13:42 +02:00
birdi
ed0d4796e7 Merge branch 'dev-2.x' into add-new-ways-throttle
# Conflicts:
#	examples/throtling_example.py
2019-08-15 17:06:10 +03:00
Alex Root Junior
23ceb1445e
Merge branch 'dev-2.x' into dev-2.x 2019-08-15 16:52:51 +03:00
Suren Khorenyan
58a5da925a Refactor examples/webhook_example.py 2019-08-11 22:52:54 +03:00
Suren Khorenyan
251760a032 Rename webhook example 2019-08-11 22:51:50 +03:00
Suren Khorenyan
fdf3c44860 Rename old webhook example 2019-08-11 22:50:58 +03:00
Suren Khorenyan
94811c57e1 Minor refactor examples/text_filter_example.py and examples/throtling_example.py 2019-08-11 22:02:36 +03:00
Suren Khorenyan
8538e6af57 Refactor examples/regular_keyboard_example.py 2019-08-11 21:52:58 +03:00
Suren Khorenyan
747c87631e Refactor examples/regexp_commands_filter_example.py 2019-08-11 16:31:01 +03:00
Suren Khorenyan
a93fb46382 Refactor examples/proxy_and_emojize.py 2019-08-11 15:49:27 +03:00
Suren Khorenyan
68aa7dbf1a Refactor examples/payments.py 2019-08-11 15:30:01 +03:00
Suren Khorenyan
95fcaaeed7 Micro refactor 2019-08-10 22:09:29 +03:00
Suren Khorenyan
7a155794e2 Refactor examples/inline_keyboard_example.py 2019-08-10 21:55:52 +03:00
Suren Khorenyan
c6871f8071 Refactor examples/inline_bot.py 2019-08-10 20:17:03 +03:00
Suren Khorenyan
a4f8dc907a Refactor examples/id_filter_example.py 2019-08-10 18:41:50 +03:00
Suren Khorenyan
a78b93c5cd Refactor examples/i18n_example.py 2019-08-10 17:55:39 +03:00
Suren Khorenyan
d360538bba Some localization changes 2019-08-10 00:08:11 +03:00
Suren Khorenyan
ad7238fda8 Some refactor 2019-08-10 00:08:11 +03:00
Suren Khorenyan
3867b72df6 Refactor examples/echo_bot.py 2019-08-10 00:08:11 +03:00
Suren Khorenyan
f4aafb043e Refactor examples/check_user_language.py 2019-08-10 00:08:11 +03:00
Suren Khorenyan
cb7ec3edb8 Refactor examples/callback_data_factory_simple.py 2019-08-10 00:08:11 +03:00
Suren Khorenyan
846f83f117 Some callback_data_factory.py refactor 2019-08-10 00:08:11 +03:00
Arslan 'Ars2014' Sakhapov
c0e60f8706 Fix issues and rework AdminFilter 2019-08-08 20:53:52 +05:00
Arslan 'Ars2014' Sakhapov
bd032f066e Added AdminFilter and example of its usage 2019-08-08 19:12:49 +05:00
birdi
288c7099b0 add support of no argument in dp.throttled 2019-08-03 18:39:54 +03:00
birdi
0c715add94 Update throttling example 2019-08-03 15:28:36 +03:00
birdi
e4b0c2a3df Add example of usage of multiple text filter 2019-07-28 11:59:20 +03:00
birdi
8b028693b6 Remove user and chat arguments, update the example 2019-07-22 17:49:30 +03:00
birdi
80b1168480 Fix docs and rename id-filter-example.py -> id_filter_example.py 2019-07-22 16:56:47 +03:00
birdi
6bbc808a3b Add support for a list of ids and update the example 2019-07-22 04:33:55 +03:00
birdi
6a3c13ed50 Fix example directory 2019-07-22 04:21:16 +03:00
birdi
c1fc41bd7e Add example of usage of IdFilter 2019-07-22 04:16:30 +03:00