Commit Graph

15 Commits

Author SHA1 Message Date
Alisson Lauffer
02a3969101
Fix Message.command when case is different (#757)
* Fix Message.command when case is different

* Update test_command.py

Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
2021-09-14 18:33:54 +02:00
Dan
934091d8ea Fix get_me being called for every command
It needs to be called once only
2021-05-07 13:18:00 +02:00
Dan
636ff776d6 Fix duplicated commands in Message.command
Also add more test cases
Related to #676
2021-05-06 19:21:25 +02:00
Dan
4fc4501445 Remove trailing username when adding args to Message.command
Fixes #676
2021-05-06 13:02:26 +02:00
Dan
e9e6c30d05 Handle bot commands with trailing usernames
Closes #139, #615
2021-05-05 13:58:03 +02:00
Dan
66b1229664 Fix broken hyperlinks 2021-03-20 10:40:38 +01:00
Dan
783e89e0f0 Add filters for voice chat service messages 2021-03-17 13:22:19 +01:00
Dan
6678af08aa Add filters.dice to filter Dice messages 2021-03-17 13:18:16 +01:00
Dametto Luca
54b20875b9
Fix filters.create documentation (#623)
Wrong documentation for filters.create, callable funcitions requires 3 positional arguments (filter, client, update) and not two.
2021-03-14 12:44:13 +01:00
Dan
7dda167c09 Update copyright notice
Year 2021
2021-01-01 22:58:48 +01:00
Alisson Lauffer
1dc4df8cb1
Improve typing hints (#537)
* Change type1 or type2 to Union[type1, type2]

* Address @KunoiSayami suggestions

* Change Union[type1, None] to Optional[type1]

* Update PR with latest commit changes

* Address Dan suggestions
2020-12-20 17:05:17 +01:00
M. Smits
332468d271
Enhance filters.me to allow it intercept own anonymous messages (#501)
* Check message.outgoing 'True' in me_filter.

* After reinterpretation of the ticket, check if user or outgiong.

Closes #499
2020-10-18 18:37:41 +02:00
Dan
01ec5d7f1d Fix a bad docstring indentation in filters.regex 2020-08-24 09:51:21 +02:00
Dan
3e3d77fdaf Implement short-circuit evaluation for filters
AND and OR operations will not evaluate the second operand
in case the first one is, respectively, False and True.
2020-08-24 09:20:10 +02:00
Dan
538f1e3972 Deep rewrite: preparing for v1.0
- Pyrogram core is now fully asynchronous
- Ditched Python 3.5, welcome 3.6 as minimum version.
- Moved all types to pyrogram.types
- Turned the Filters class into a module (filters)
- Moved all filters to pyrogram.filters
- Moved all handlers to pyrogram.handlers
- Moved all emoji to pyrogram.emoji
- Renamed pyrogram.api to pyrogram.raw
- Clock is now synced with server's time
- Telegram schema updated to Layer 117
- Greatly improved the TL compiler (proper type-constructor hierarchy)
- Added "do not edit" warning in generated files
- Crypto parts are executed in a thread pool to avoid blocking the event loop
- idle() is now a separate function (it doesn't deal with Client instances)
- Async storage, async filters and async progress callback (optional, can be sync too)
- Added getpass back, for hidden password inputs
2020-08-22 08:05:05 +02:00