Commit graph

1617 commits

Author SHA1 Message Date
samuelfirst
2b1c72c08c Use global disable_web_page_preview in InputTextMessageContent 2022-01-02 19:49:54 +03:00
samuelfirst
301a43e26b Set default disable_web_page_preview 2022-01-02 19:49:54 +03:00
Oleg A
583f00ce31
feat: TelegramObject readable representation (#796) 2021-12-29 03:38:37 +02:00
ульба
763efb7763
Missing space (#775) 2021-12-11 01:00:09 +02:00
Alex Root Junior
dea94d2574 Bump version, added Python 3.10 classifier 2021-12-09 02:06:23 +02:00
Oleg A
3b93f337d1
Telegram API silent update (#772)
* fix: silent update

Special thanks for @levlam for silent Telegram API updates with removing fields.

* chore: add removed_argument deprecation

* Mark removed argument in method alias

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2021-12-09 02:00:51 +02:00
abdullaev388
2ece1ba140
Removed legacy code (markdown v1) (#771) 2021-12-09 01:52:54 +02:00
Oleg A
910e4d7784
Bot API 5.5 (#768)
* chore: bump version 5.5

* feat: add banChatSenderChat and unbanChatSenderChat

Added the methods banChatSenderChat and unbanChatSenderChat for banning and unbanning channel chats in supergroups and channels.

* feat: add has_private_forwards

Added the field has_private_forwards to the class Chat for private chats, which can be used to check the possibility of mentioning the user by their ID.

* feat: add has_protected_content

Added the field has_protected_content to the classes Chat and Message.

* feat: add is_automatic_forward

Added the field is_automatic_forward to the class Message.

* feat: add shortcuts

Added Chat.ban_sender_chat() and Chat.unban_sender_chat() shortcuts.

* docs: add new methods Source
2021-12-07 20:03:13 +02:00
Oleg A
5bcbcedeba
fix: header values must be str instances (#765)
#762
2021-12-07 00:41:07 +02:00
Cyril Margorin
d646e19852
Fix fsmcontextproxy update (#755)
* Create test case for invalid 'FSMContextProxy.update()' function

* Fix invalid 'FSMContextProxy.update()' function

* Verify that written data has been stored and read back correctly
2021-12-01 02:43:12 +02:00
barbashovtd
bccfca7cae
Project typos fix (#691)
* Fixed typo in fields.py

* Update fields.py

* Whole project typos fix
2021-11-08 23:28:30 +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
720a5451b7 Fixed fixture 2021-11-07 01:47:04 +02:00
Alex Root Junior
c00005f41a Update dependencies in setup.py 2021-11-07 01:44:13 +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
darksidecat
b98ec3efad
add Bot.download_file aliases ability to save files to a directory and automatically create directories (#694)
* add destination_dir and make_dirs parameters to bot download aliases

* add the ability to save files to a directory with path completion based on file_path,
* add an option to automatically create directories in the file path

* Downloadable mixin uses directory creation parameter in bot methods
2021-11-07 01:28:12 +02:00
Ramzan Bekbulatov
204a2a1ec0
enh: change invisible symbol in hide_link (#738)
There is a problem with the current symbol on android devices. When trying to change the text of a post in a channel, the hidden link often disappeared when editing. Word joiner symbol seems to be more stable in this case.

https://en.wikipedia.org/wiki/Word_joiner
2021-11-07 01:26:59 +02:00
Ramzan Bekbulatov
57aea755a2
enh: remove unnecessarily strict condition in send_media_group (#742)
* enh: remove unneccesarily strict condition in send_media_group

* enh: return check but less strict

* fix: remove trailing whitespace
2021-11-07 01:24:05 +02:00
Gabben
a57f9cfc70
Fixed send_copy: added caption to send_voice (#722) 2021-10-09 20:22:06 +03:00
Oleg A
100848b889
chore: reuse json util #712 (#713) 2021-10-06 00:59:43 +03:00
Oleg A
daf085ff9e
chore: show callback_query.data in logging (#714) 2021-10-06 00:59:04 +03:00
Alex Root Junior
e5cce6edf8 Bump version 2021-09-19 12:38:06 +03:00
darksidecat
358ecc7821
Fix #665, add separate parametrs for saving to directory and file (#677)
* close #665

* add backward compatibility

* improve doc, codestyle

* warning text update

* use tmpdir fixture in tests
2021-09-06 00:05:52 +03:00
Oleg A
82b1b1ab03
fix: decode aioredis v2 responses (#675) 2021-09-05 23:48:38 +03:00
Andrew
adaa21c0cc
Add type hints to url & get_mention in User (#679) 2021-09-05 23:47:12 +03:00
Oleg A
3ee28281c4
RedisStorage major fixes + tests updates (#676)
* fix: redis async close

* fix: redis adapter async close

* fix: aioredis pytest update

* fix: tests remove unused old_storage mark

* fix: tests remove redundant linebreak

* fix: tests remove redundant s.redis call
2021-09-05 23:46:50 +03:00
Sina Ebrahimi
c89bf6fbf8
Fix: get the left-most ip when there is multiple (#673)
X-Forwarded-For: <client>, <proxy1>, <proxy2>
get the <client> part when there is multiple proxies or load balancers
2021-08-25 22:28:38 +03:00
Oleg A
3aa40224a2
aioredis v2 support (#649)
* feat: aioredis v1-v2 adapters #648

* chore: aioredis version without importlib

* chore: refactor _get_redis for adapter

* chore: proxy Redis methods

* chore: adapter.get_redis become public

* fix: add missed redis methods

* chore: separate get_adapter method

* chore: remove method proxy

* chore: add docstrings

* chore: add redis deprecations

* docs: correct redis storage version

* chore: encoding one style

* refactor: remove redundant import

* fix: int version
2021-08-05 22:34:15 +03:00
Ramzan Bekbulatov
aaf0b42acf
Fix: method Chat.get_member_count usage without argument (#643)
* fix: wrong argument passed to get_member_count()

* fix: not async .close() for aiohttp.ClientResponse

* fix: wrong parameter passed to InputFile

* enh: implement all abstract methods for DisabledStorage

* ref: style fixes
2021-08-05 22:32:30 +03:00
Ramzan Bekbulatov
580fa2e499
Allow empty and zero parts in CallbackData (#646)
* enh: allow empty parts in CallbackData

* enh: allow zero parts in CallbackData

* new: tests for CallbackData
2021-08-01 00:05:21 +03:00
Ramzan Bekbulatov
f6f2972a11
Add to ChatMemberOwner new default fields (#645)
* new: add field type ConstField

* new: add const fields for ChatMemberOwner

* new: better typings for get_chat_administrators

* new: add tests for chat owner fields

* fix: Type typing for class

* enh: alias is_chat_owner for is_chat_creator
2021-07-31 21:47:37 +03:00
Oleg Koloskov
7feb0cade0
Fix between condition in send_media_group method (#642) 2021-07-28 22:11:26 +03:00
Oleg A
29d2ffc9ed
fix: add missed ChatMember{x} in types (#636) 2021-07-24 23:00:21 +03:00
Almaz
82d10844d7
Replace for loops with comprehensions (#629) 2021-07-18 14:23:18 +03:00
Almaz
ebd7f79326
Replace yield inside for loop with yield from (#631) 2021-07-18 14:20:49 +03:00
Almaz
70aa80abf1
Simplify some conditions (#632) 2021-07-18 14:20:07 +03:00
Alex Root Junior
04a64fbfc5 Bump version 2021-07-10 23:06:27 +03:00
Alex Root Junior
d41ce71c02 Merge branch 'master' into dev-2.x 2021-07-10 23:06:14 +03:00
Oleg A
7a9bab01eb
fix: deserialize via to_object method (#624) 2021-07-10 22:43:36 +03:00
Oleg A
2b4e3ad5c6
fix: optional list field serialize-deserialize (#622) 2021-07-07 02:21:15 +03:00
Oleg A
a26c6428a3
fix: chat_member status check (#621) 2021-07-06 13:20:52 +03:00
Alex Root Junior
7edf9e77b6 Bump version 2021-07-06 01:23:51 +03:00
Alex Root Junior
a6782d91ba Merge branch 'dev-2.x' 2021-07-06 01:23:11 +03:00
alfred richardsn
899228904a
Fix unused default locale in I18nMiddleware (#562) (#563)
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2021-07-06 01:12:52 +03:00
Andrey Tikhonov
2e207c636c
fix fault on reset_state in memory storage (#619) 2021-07-06 01:10:51 +03:00
Alex Root Junior
f6730d0e93 Merge branch 'dev-2.x' 2021-07-05 02:43:40 +03:00
Alex Root Junior
64a7a781da Bump version 2021-07-05 02:43:32 +03:00
Alex Root Junior
af031431f5 Fixed BotCommandScopeType helper mode 2021-07-05 02:42:51 +03:00
Alex Root Junior
3cdc2f750b Merge branch 'dev-2.x' 2021-07-05 00:03:29 +03:00
Oleg A
f18e4491c2
Telegram API 5.3 (#610)
* docs: api version update

* feat: personalized commands

* feat: custom placeholders

* refactor: ChatMember split

* fix: old names for ChatMemberStatus

* refactor: renamed kickChatMember to banChatMember

* style: align params

* refactor: renamed getChatMembersCount to getChatMemberCount (#614)

* feat: resolve ChatMember

* refactor: renamed BotCommandScopeTypes (similar to code style)

* refactor: resolve is a static method

* Construct BotCommandScope from type

* Make BotCommandScope classmethod instead of method

* Use classmethod for ChatMember resolve method

Co-authored-by: Hoi Dmytro <dmytro.hoi@gmail.com>
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2021-07-04 23:52:55 +03:00