Change magic filter examples

This commit is contained in:
JRoot Junior 2024-02-09 21:27:21 +02:00
parent f7af9e7f4a
commit 091b82e13f
No known key found for this signature in database
GPG key ID: 738964250D5FF6E2

View file

@ -53,6 +53,7 @@ Equals
F.text == 'hello' # lambda message: message.text == 'hello' F.text == 'hello' # lambda message: message.text == 'hello'
F.from_user.id == 42 # lambda message: message.from_user.id == 42 F.from_user.id == 42 # lambda message: message.from_user.id == 42
F.text != 'spam' # lambda message: message.text != 'spam'
Is one of Is one of
--------- ---------
@ -104,7 +105,7 @@ Any of available operation can be inverted by bitwise inversion - :code:`~`
.. code-block:: python .. code-block:: python
~(F.text == 'spam') # lambda message: message.text != 'spam' ~F.text # lambda message: not message.text
~F.text.startswith('spam') # lambda message: not message.text.startswith('spam') ~F.text.startswith('spam') # lambda message: not message.text.startswith('spam')
Combining Combining