diff --git a/NOTICE b/NOTICE index a7e2b00a..dd0fdf54 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Pyrogram - Telegram MTProto API Client Library for Python -Copyright (C) 2017-2018 Dan Tès +Copyright (C) 2017-2019 Dan Tès This file is part of Pyrogram. diff --git a/compiler/__init__.py b/compiler/__init__.py index eddf3281..f3769dd4 100644 --- a/compiler/__init__.py +++ b/compiler/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/compiler/api/__init__.py b/compiler/api/__init__.py index eddf3281..f3769dd4 100644 --- a/compiler/api/__init__.py +++ b/compiler/api/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/compiler/api/compiler.py b/compiler/api/compiler.py index d31353c6..57e4d22b 100644 --- a/compiler/api/compiler.py +++ b/compiler/api/compiler.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/compiler/docs/__init__.py b/compiler/docs/__init__.py index eddf3281..f3769dd4 100644 --- a/compiler/docs/__init__.py +++ b/compiler/docs/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/compiler/docs/compiler.py b/compiler/docs/compiler.py index 57f4827f..6ea2240d 100644 --- a/compiler/docs/compiler.py +++ b/compiler/docs/compiler.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/compiler/error/__init__.py b/compiler/error/__init__.py index eddf3281..f3769dd4 100644 --- a/compiler/error/__init__.py +++ b/compiler/error/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/compiler/error/compiler.py b/compiler/error/compiler.py index aaefde9f..b86222e7 100644 --- a/compiler/error/compiler.py +++ b/compiler/error/compiler.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/docs/source/index.rst b/docs/source/index.rst index 085b38fb..ca9a38a3 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -84,6 +84,7 @@ To get started, press the Next button. resources/UpdateHandling resources/UsingFilters + resources/MoreOnUpdates resources/SmartPlugins resources/AutoAuthorization resources/CustomizeSessions diff --git a/docs/source/resources/MoreOnUpdates.rst b/docs/source/resources/MoreOnUpdates.rst new file mode 100644 index 00000000..44295f35 --- /dev/null +++ b/docs/source/resources/MoreOnUpdates.rst @@ -0,0 +1,148 @@ +More on Updates +=============== + +Here we'll show some advanced usages when working with updates. + +.. note:: + This page makes use of Handlers and Filters to show you how to handle updates. + Learn more at `Update Handling `_ and `Using Filters `_. + +Handler Groups +-------------- + +If you register handlers with overlapping filters, only the first one is executed and any other handler will be ignored. + +In order to process the same update more than once, you can register your handler in a different group. +Groups are identified by a number (number 0 being the default) and are sorted, that is, a lower group number has a +higher priority. + +For example, in: + +.. code-block:: python + + @app.on_message(Filters.text | Filters.sticker) + def text_or_sticker(client, message): + print("Text or Sticker") + + + @app.on_message(Filters.text) + def just_text(client, message): + print("Just Text") + +``just_text`` is never executed because ``text_or_sticker`` already handles texts. To enable it, simply register the +function using a different group: + +.. code-block:: python + + @app.on_message(Filters.text, group=1) + def just_text(client, message): + print("Just Text") + +Or, if you want ``just_text`` to be fired *before* ``text_or_sticker`` (note ``-1``, which is less than ``0``): + +.. code-block:: python + + @app.on_message(Filters.text, group=-1) + def just_text(client, message): + print("Just Text") + +With :meth:`add_handler() ` (without decorators) the same can be achieved with: + +.. code-block:: python + + app.add_handler(MessageHandler(just_text, Filters.text), -1) + +Update propagation +------------------ + +Registering multiple handlers, each in a different group, becomes useful when you want to handle the same update more +than once. Any incoming update will be sequentially processed by all of your registered functions by respecting the +groups priority policy described above. Even in case any handler raises an unhandled exception, Pyrogram will still +continue to propagate the same update to the next groups until all the handlers are done. Example: + +.. code-block:: python + + @app.on_message(Filters.private) + def _(client, message): + print(0) + + + @app.on_message(Filters.private, group=1) + def _(client, message): + print(1 / 0) # Unhandled exception: ZeroDivisionError + + + @app.on_message(Filters.private, group=2) + def _(client, message): + print(2) + +All these handlers will handle the same kind of messages, that are, messages sent or received in private chats. +The output for each incoming update will therefore be: + +.. code-block:: text + + 0 + ZeroDivisionError: division by zero + 2 + +Stop Propagation +^^^^^^^^^^^^^^^^ + +In order to prevent further propagation of an update in the dispatching phase, you can do *one* of the following: + +- Call the update's bound-method ``.stop_propagation()`` (preferred way). +- Manually ``raise StopPropagation`` error (more suitable for raw updates only). + +.. note:: + + Note that ``.stop_propagation()`` is just an elegant and intuitive way to raise a ``StopPropagation`` error; + this means that any code coming *after* calling it won't be executed as your function just raised a custom exception + to signal the dispatcher not to propagate the update anymore. + +Example with ``stop_propagation()``: + +.. code-block:: python + + @app.on_message(Filters.private) + def _(client, message): + print(0) + + + @app.on_message(Filters.private, group=1) + def _(client, message): + print(1) + message.stop_propagation() + + + @app.on_message(Filters.private, group=2) + def _(client, message): + print(2) + +Example with ``raise StopPropagation``: + +.. code-block:: python + + from pyrogram import StopPropagation + + @app.on_message(Filters.private) + def _(client, message): + print(0) + + + @app.on_message(Filters.private, group=1) + def _(client, message): + print(1) + raise StopPropagation + + + @app.on_message(Filters.private, group=2) + def _(client, message): + print(2) + +The handler in group number 2 will never be executed because the propagation was stopped before. The output of both +examples will be: + +.. code-block:: text + + 0 + 1 diff --git a/docs/source/resources/UsingFilters.rst b/docs/source/resources/UsingFilters.rst index d70005a5..3fe87b8a 100644 --- a/docs/source/resources/UsingFilters.rst +++ b/docs/source/resources/UsingFilters.rst @@ -5,7 +5,8 @@ For a finer grained control over what kind of messages will be allowed or not in :class:`Filters `. .. note:: - This section makes use of Handlers to handle updates. Learn more at `Update Handling `_. + This page makes use of Handlers to show you how to handle updates. + Learn more at `Update Handling `_. - This example will show you how to **only** handle messages containing an :obj:`Audio ` object and ignore any other message: @@ -99,45 +100,6 @@ More handlers using different filters can also live together. def from_pyrogramchat(client, message): print("New message in @PyrogramChat") -Handler Groups --------------- - -If you register handlers with overlapping filters, only the first one is executed and any other handler will be ignored. - -In order to process the same message more than once, you can register your handler in a different group. -Groups are identified by a number (number 0 being the default) and are sorted. This means that a lower group number has -a higher priority. - -For example, in: - -.. code-block:: python - - @app.on_message(Filters.text | Filters.sticker) - def text_or_sticker(client, message): - print("Text or Sticker") - - - @app.on_message(Filters.text) - def just_text(client, message): - print("Just Text") - -``just_text`` is never executed because ``text_or_sticker`` already handles texts. To enable it, simply register the -function using a different group: - -.. code-block:: python - - @app.on_message(Filters.text, group=1) - def just_text(client, message): - print("Just Text") - -or, if you want ``just_text`` to be fired *before* ``text_or_sticker`` (note ``-1``, which is less than ``0``): - -.. code-block:: python - - @app.on_message(Filters.text, group=-1) - def just_text(client, message): - print("Just Text") - Custom Filters -------------- diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py index 86f66c48..ddbf9bb0 100644 --- a/pyrogram/__init__.py +++ b/pyrogram/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # @@ -40,7 +40,7 @@ from .client.types import ( Location, Message, MessageEntity, Dialog, Dialogs, Photo, PhotoSize, Sticker, User, UserStatus, UserProfilePhotos, Venue, Animation, Video, VideoNote, Voice, CallbackQuery, Messages, ForceReply, InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, ReplyKeyboardMarkup, ReplyKeyboardRemove, - Poll, PollOption, ChatPreview + Poll, PollOption, ChatPreview, StopPropagation ) from .client import ( Client, ChatAction, ParseMode, Emoji, diff --git a/pyrogram/api/__init__.py b/pyrogram/api/__init__.py index 71e28d6b..e57f0661 100644 --- a/pyrogram/api/__init__.py +++ b/pyrogram/api/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/__init__.py b/pyrogram/api/core/__init__.py index 2bf38b8d..daba6b7c 100644 --- a/pyrogram/api/core/__init__.py +++ b/pyrogram/api/core/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/future_salt.py b/pyrogram/api/core/future_salt.py index 99f11678..bce01dc8 100644 --- a/pyrogram/api/core/future_salt.py +++ b/pyrogram/api/core/future_salt.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/future_salts.py b/pyrogram/api/core/future_salts.py index dc579035..bddfdb47 100644 --- a/pyrogram/api/core/future_salts.py +++ b/pyrogram/api/core/future_salts.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/gzip_packed.py b/pyrogram/api/core/gzip_packed.py index 93c3b377..8b26be9d 100644 --- a/pyrogram/api/core/gzip_packed.py +++ b/pyrogram/api/core/gzip_packed.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/message.py b/pyrogram/api/core/message.py index 1a48489a..35459ef8 100644 --- a/pyrogram/api/core/message.py +++ b/pyrogram/api/core/message.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/msg_container.py b/pyrogram/api/core/msg_container.py index 7728bd37..4373498d 100644 --- a/pyrogram/api/core/msg_container.py +++ b/pyrogram/api/core/msg_container.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/object.py b/pyrogram/api/core/object.py index a1e20726..1a3cb388 100644 --- a/pyrogram/api/core/object.py +++ b/pyrogram/api/core/object.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/primitives/__init__.py b/pyrogram/api/core/primitives/__init__.py index 63d7ef97..8885878b 100644 --- a/pyrogram/api/core/primitives/__init__.py +++ b/pyrogram/api/core/primitives/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/primitives/bool.py b/pyrogram/api/core/primitives/bool.py index 9641e865..117ee7a4 100644 --- a/pyrogram/api/core/primitives/bool.py +++ b/pyrogram/api/core/primitives/bool.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/primitives/bytes.py b/pyrogram/api/core/primitives/bytes.py index d161cc9c..8030b598 100644 --- a/pyrogram/api/core/primitives/bytes.py +++ b/pyrogram/api/core/primitives/bytes.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/primitives/double.py b/pyrogram/api/core/primitives/double.py index 94d7e3b9..3dcaa461 100644 --- a/pyrogram/api/core/primitives/double.py +++ b/pyrogram/api/core/primitives/double.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/primitives/int.py b/pyrogram/api/core/primitives/int.py index 4b9aded8..7833a610 100644 --- a/pyrogram/api/core/primitives/int.py +++ b/pyrogram/api/core/primitives/int.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/primitives/null.py b/pyrogram/api/core/primitives/null.py index 7a26b112..d2d3b1c0 100644 --- a/pyrogram/api/core/primitives/null.py +++ b/pyrogram/api/core/primitives/null.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/primitives/string.py b/pyrogram/api/core/primitives/string.py index 3584d1b9..a271695a 100644 --- a/pyrogram/api/core/primitives/string.py +++ b/pyrogram/api/core/primitives/string.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/core/primitives/vector.py b/pyrogram/api/core/primitives/vector.py index e2642e0f..cd24ec35 100644 --- a/pyrogram/api/core/primitives/vector.py +++ b/pyrogram/api/core/primitives/vector.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/errors/__init__.py b/pyrogram/api/errors/__init__.py index 0ed04e02..ca65619c 100644 --- a/pyrogram/api/errors/__init__.py +++ b/pyrogram/api/errors/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/api/errors/error.py b/pyrogram/api/errors/error.py index 397af546..5f92a369 100644 --- a/pyrogram/api/errors/error.py +++ b/pyrogram/api/errors/error.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/__init__.py b/pyrogram/client/__init__.py index 00b9905a..2719d82e 100644 --- a/pyrogram/client/__init__.py +++ b/pyrogram/client/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 77c4452c..6e879cc8 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/dispatcher/__init__.py b/pyrogram/client/dispatcher/__init__.py index c0cb368a..e2e67b70 100644 --- a/pyrogram/client/dispatcher/__init__.py +++ b/pyrogram/client/dispatcher/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/dispatcher/dispatcher.py b/pyrogram/client/dispatcher/dispatcher.py index 8a22ad7e..0413f369 100644 --- a/pyrogram/client/dispatcher/dispatcher.py +++ b/pyrogram/client/dispatcher/dispatcher.py @@ -131,23 +131,28 @@ class Dispatcher: parsed_update, handler_type = await parser(update, users, chats) for group in self.groups.values(): - for handler in group: - args = None + try: + for handler in group: + args = None - if isinstance(handler, RawUpdateHandler): - args = (update, users, chats) - elif isinstance(handler, handler_type): - if handler.check(parsed_update): - args = (parsed_update,) + if isinstance(handler, RawUpdateHandler): + args = (update, users, chats) + elif isinstance(handler, handler_type): + if handler.check(parsed_update): + args = (parsed_update,) - if args is None: - continue + if args is None: + continue + + try: + await handler.callback(self.client, *args) + except StopIteration: + raise + except Exception as e: + log.error(e, exc_info=True) - try: - await handler.callback(self.client, *args) - except Exception as e: - log.error(e, exc_info=True) - finally: break + except StopIteration: + break except Exception as e: log.error(e, exc_info=True) diff --git a/pyrogram/client/ext/__init__.py b/pyrogram/client/ext/__init__.py index 38eaf089..ce80958a 100644 --- a/pyrogram/client/ext/__init__.py +++ b/pyrogram/client/ext/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/ext/base_client.py b/pyrogram/client/ext/base_client.py index e6ddc505..11be58e1 100644 --- a/pyrogram/client/ext/base_client.py +++ b/pyrogram/client/ext/base_client.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/ext/chat_action.py b/pyrogram/client/ext/chat_action.py index 96c5164e..c0ee0585 100644 --- a/pyrogram/client/ext/chat_action.py +++ b/pyrogram/client/ext/chat_action.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/ext/emoji.py b/pyrogram/client/ext/emoji.py index b2dd99fd..20d154f4 100644 --- a/pyrogram/client/ext/emoji.py +++ b/pyrogram/client/ext/emoji.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/ext/parse_mode.py b/pyrogram/client/ext/parse_mode.py index 817bccb0..46ed97e3 100644 --- a/pyrogram/client/ext/parse_mode.py +++ b/pyrogram/client/ext/parse_mode.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/ext/syncer.py b/pyrogram/client/ext/syncer.py index 66d28da1..c07d1936 100644 --- a/pyrogram/client/ext/syncer.py +++ b/pyrogram/client/ext/syncer.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/ext/utils.py b/pyrogram/client/ext/utils.py index cb2dda39..3d7d9408 100644 --- a/pyrogram/client/ext/utils.py +++ b/pyrogram/client/ext/utils.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/filters/__init__.py b/pyrogram/client/filters/__init__.py index 88ae14e3..318d8645 100644 --- a/pyrogram/client/filters/__init__.py +++ b/pyrogram/client/filters/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/filters/filter.py b/pyrogram/client/filters/filter.py index feec51df..f8bf5e3e 100644 --- a/pyrogram/client/filters/filter.py +++ b/pyrogram/client/filters/filter.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/filters/filters.py b/pyrogram/client/filters/filters.py index 1347f993..c0ebfdcf 100644 --- a/pyrogram/client/filters/filters.py +++ b/pyrogram/client/filters/filters.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/handlers/__init__.py b/pyrogram/client/handlers/__init__.py index ff1ead7a..499ed007 100644 --- a/pyrogram/client/handlers/__init__.py +++ b/pyrogram/client/handlers/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/handlers/callback_query_handler.py b/pyrogram/client/handlers/callback_query_handler.py index 5d09f7d9..e991c019 100644 --- a/pyrogram/client/handlers/callback_query_handler.py +++ b/pyrogram/client/handlers/callback_query_handler.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/handlers/deleted_messages_handler.py b/pyrogram/client/handlers/deleted_messages_handler.py index 8f5ef448..c084f353 100644 --- a/pyrogram/client/handlers/deleted_messages_handler.py +++ b/pyrogram/client/handlers/deleted_messages_handler.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/handlers/disconnect_handler.py b/pyrogram/client/handlers/disconnect_handler.py index a8b800a8..1e88a7ee 100644 --- a/pyrogram/client/handlers/disconnect_handler.py +++ b/pyrogram/client/handlers/disconnect_handler.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/handlers/handler.py b/pyrogram/client/handlers/handler.py index 0e46a205..9fd0e206 100644 --- a/pyrogram/client/handlers/handler.py +++ b/pyrogram/client/handlers/handler.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/handlers/message_handler.py b/pyrogram/client/handlers/message_handler.py index e4c3d13f..8a52a0b5 100644 --- a/pyrogram/client/handlers/message_handler.py +++ b/pyrogram/client/handlers/message_handler.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/handlers/raw_update_handler.py b/pyrogram/client/handlers/raw_update_handler.py index 5a8913b6..3a5dea50 100644 --- a/pyrogram/client/handlers/raw_update_handler.py +++ b/pyrogram/client/handlers/raw_update_handler.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/handlers/user_status_handler.py b/pyrogram/client/handlers/user_status_handler.py index 2442d7eb..643a064d 100644 --- a/pyrogram/client/handlers/user_status_handler.py +++ b/pyrogram/client/handlers/user_status_handler.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/__init__.py b/pyrogram/client/methods/__init__.py index ea249e3f..625ec09a 100644 --- a/pyrogram/client/methods/__init__.py +++ b/pyrogram/client/methods/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/bots/__init__.py b/pyrogram/client/methods/bots/__init__.py index 2d89c2fb..b0430efe 100644 --- a/pyrogram/client/methods/bots/__init__.py +++ b/pyrogram/client/methods/bots/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/bots/answer_callback_query.py b/pyrogram/client/methods/bots/answer_callback_query.py index 6aaeafd8..ba33f7c2 100644 --- a/pyrogram/client/methods/bots/answer_callback_query.py +++ b/pyrogram/client/methods/bots/answer_callback_query.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/bots/get_inline_bot_results.py b/pyrogram/client/methods/bots/get_inline_bot_results.py index 0953b6c1..6c370794 100644 --- a/pyrogram/client/methods/bots/get_inline_bot_results.py +++ b/pyrogram/client/methods/bots/get_inline_bot_results.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/bots/request_callback_answer.py b/pyrogram/client/methods/bots/request_callback_answer.py index 5bd7adef..68c971ad 100644 --- a/pyrogram/client/methods/bots/request_callback_answer.py +++ b/pyrogram/client/methods/bots/request_callback_answer.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/bots/send_inline_bot_result.py b/pyrogram/client/methods/bots/send_inline_bot_result.py index 3c9ab5ac..b204c9f2 100644 --- a/pyrogram/client/methods/bots/send_inline_bot_result.py +++ b/pyrogram/client/methods/bots/send_inline_bot_result.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/__init__.py b/pyrogram/client/methods/chats/__init__.py index 3d928e87..745678cc 100644 --- a/pyrogram/client/methods/chats/__init__.py +++ b/pyrogram/client/methods/chats/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/delete_chat_photo.py b/pyrogram/client/methods/chats/delete_chat_photo.py index d076a600..58fb2f56 100644 --- a/pyrogram/client/methods/chats/delete_chat_photo.py +++ b/pyrogram/client/methods/chats/delete_chat_photo.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/export_chat_invite_link.py b/pyrogram/client/methods/chats/export_chat_invite_link.py index c02f49de..10ab8747 100644 --- a/pyrogram/client/methods/chats/export_chat_invite_link.py +++ b/pyrogram/client/methods/chats/export_chat_invite_link.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/get_chat.py b/pyrogram/client/methods/chats/get_chat.py index 7e8fdeb7..34d46bcf 100644 --- a/pyrogram/client/methods/chats/get_chat.py +++ b/pyrogram/client/methods/chats/get_chat.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/get_chat_member.py b/pyrogram/client/methods/chats/get_chat_member.py index 81c7f137..a8af8dd1 100644 --- a/pyrogram/client/methods/chats/get_chat_member.py +++ b/pyrogram/client/methods/chats/get_chat_member.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/get_chat_members.py b/pyrogram/client/methods/chats/get_chat_members.py index dfe2844e..149afa3e 100644 --- a/pyrogram/client/methods/chats/get_chat_members.py +++ b/pyrogram/client/methods/chats/get_chat_members.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/get_chat_members_count.py b/pyrogram/client/methods/chats/get_chat_members_count.py index 8f5ee51c..227e4255 100644 --- a/pyrogram/client/methods/chats/get_chat_members_count.py +++ b/pyrogram/client/methods/chats/get_chat_members_count.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/get_dialogs.py b/pyrogram/client/methods/chats/get_dialogs.py index b5726ea1..dc3fa8a5 100644 --- a/pyrogram/client/methods/chats/get_dialogs.py +++ b/pyrogram/client/methods/chats/get_dialogs.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/join_chat.py b/pyrogram/client/methods/chats/join_chat.py index 6daaac6e..f3b5d19f 100644 --- a/pyrogram/client/methods/chats/join_chat.py +++ b/pyrogram/client/methods/chats/join_chat.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/kick_chat_member.py b/pyrogram/client/methods/chats/kick_chat_member.py index efa6ff52..344ceed2 100644 --- a/pyrogram/client/methods/chats/kick_chat_member.py +++ b/pyrogram/client/methods/chats/kick_chat_member.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/leave_chat.py b/pyrogram/client/methods/chats/leave_chat.py index 0f947aa8..aad3f802 100644 --- a/pyrogram/client/methods/chats/leave_chat.py +++ b/pyrogram/client/methods/chats/leave_chat.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/pin_chat_message.py b/pyrogram/client/methods/chats/pin_chat_message.py index 16df6da7..6e01f77a 100644 --- a/pyrogram/client/methods/chats/pin_chat_message.py +++ b/pyrogram/client/methods/chats/pin_chat_message.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/promote_chat_member.py b/pyrogram/client/methods/chats/promote_chat_member.py index 0602816d..103857a5 100644 --- a/pyrogram/client/methods/chats/promote_chat_member.py +++ b/pyrogram/client/methods/chats/promote_chat_member.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/restrict_chat_member.py b/pyrogram/client/methods/chats/restrict_chat_member.py index 1618a588..c6974d07 100644 --- a/pyrogram/client/methods/chats/restrict_chat_member.py +++ b/pyrogram/client/methods/chats/restrict_chat_member.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/set_chat_description.py b/pyrogram/client/methods/chats/set_chat_description.py index e1541647..cacbb06e 100644 --- a/pyrogram/client/methods/chats/set_chat_description.py +++ b/pyrogram/client/methods/chats/set_chat_description.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/set_chat_photo.py b/pyrogram/client/methods/chats/set_chat_photo.py index 76bab5e0..9f5c1d3a 100644 --- a/pyrogram/client/methods/chats/set_chat_photo.py +++ b/pyrogram/client/methods/chats/set_chat_photo.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/set_chat_title.py b/pyrogram/client/methods/chats/set_chat_title.py index 4c138965..bf247484 100644 --- a/pyrogram/client/methods/chats/set_chat_title.py +++ b/pyrogram/client/methods/chats/set_chat_title.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/unban_chat_member.py b/pyrogram/client/methods/chats/unban_chat_member.py index 3320eec2..17fb445d 100644 --- a/pyrogram/client/methods/chats/unban_chat_member.py +++ b/pyrogram/client/methods/chats/unban_chat_member.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/chats/unpin_chat_message.py b/pyrogram/client/methods/chats/unpin_chat_message.py index efdd142f..89e214c0 100644 --- a/pyrogram/client/methods/chats/unpin_chat_message.py +++ b/pyrogram/client/methods/chats/unpin_chat_message.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/contacts/__init__.py b/pyrogram/client/methods/contacts/__init__.py index e0fe52fb..ab9ae6ef 100644 --- a/pyrogram/client/methods/contacts/__init__.py +++ b/pyrogram/client/methods/contacts/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/contacts/add_contacts.py b/pyrogram/client/methods/contacts/add_contacts.py index 622f4b8b..cf78c2ac 100644 --- a/pyrogram/client/methods/contacts/add_contacts.py +++ b/pyrogram/client/methods/contacts/add_contacts.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/contacts/delete_contacts.py b/pyrogram/client/methods/contacts/delete_contacts.py index af1c58fb..d8da0e1e 100644 --- a/pyrogram/client/methods/contacts/delete_contacts.py +++ b/pyrogram/client/methods/contacts/delete_contacts.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/contacts/get_contacts.py b/pyrogram/client/methods/contacts/get_contacts.py index 2fff648a..f2873e23 100644 --- a/pyrogram/client/methods/contacts/get_contacts.py +++ b/pyrogram/client/methods/contacts/get_contacts.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/decorators/__init__.py b/pyrogram/client/methods/decorators/__init__.py index 6cf9940a..07f84b54 100644 --- a/pyrogram/client/methods/decorators/__init__.py +++ b/pyrogram/client/methods/decorators/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/decorators/on_callback_query.py b/pyrogram/client/methods/decorators/on_callback_query.py index 8c152706..bf0a823a 100644 --- a/pyrogram/client/methods/decorators/on_callback_query.py +++ b/pyrogram/client/methods/decorators/on_callback_query.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/decorators/on_deleted_messages.py b/pyrogram/client/methods/decorators/on_deleted_messages.py index 84abc92e..1b1a602b 100644 --- a/pyrogram/client/methods/decorators/on_deleted_messages.py +++ b/pyrogram/client/methods/decorators/on_deleted_messages.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/decorators/on_disconnect.py b/pyrogram/client/methods/decorators/on_disconnect.py index 56796bf5..4657af3b 100644 --- a/pyrogram/client/methods/decorators/on_disconnect.py +++ b/pyrogram/client/methods/decorators/on_disconnect.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/decorators/on_message.py b/pyrogram/client/methods/decorators/on_message.py index a252c6ba..c2f35a19 100644 --- a/pyrogram/client/methods/decorators/on_message.py +++ b/pyrogram/client/methods/decorators/on_message.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/decorators/on_raw_update.py b/pyrogram/client/methods/decorators/on_raw_update.py index ce2584d5..2deedb00 100644 --- a/pyrogram/client/methods/decorators/on_raw_update.py +++ b/pyrogram/client/methods/decorators/on_raw_update.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/decorators/on_user_status.py b/pyrogram/client/methods/decorators/on_user_status.py index c552e706..6198c9cd 100644 --- a/pyrogram/client/methods/decorators/on_user_status.py +++ b/pyrogram/client/methods/decorators/on_user_status.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/__init__.py b/pyrogram/client/methods/messages/__init__.py index cfb36fd0..237b6493 100644 --- a/pyrogram/client/methods/messages/__init__.py +++ b/pyrogram/client/methods/messages/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/delete_messages.py b/pyrogram/client/methods/messages/delete_messages.py index 96e52ba1..e7c48e43 100644 --- a/pyrogram/client/methods/messages/delete_messages.py +++ b/pyrogram/client/methods/messages/delete_messages.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/download_media.py b/pyrogram/client/methods/messages/download_media.py index 2dc0b71e..66d6ca24 100644 --- a/pyrogram/client/methods/messages/download_media.py +++ b/pyrogram/client/methods/messages/download_media.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/edit_message_caption.py b/pyrogram/client/methods/messages/edit_message_caption.py index cc950bf6..310b56aa 100644 --- a/pyrogram/client/methods/messages/edit_message_caption.py +++ b/pyrogram/client/methods/messages/edit_message_caption.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/edit_message_media.py b/pyrogram/client/methods/messages/edit_message_media.py index 596a1beb..72dcf1b2 100644 --- a/pyrogram/client/methods/messages/edit_message_media.py +++ b/pyrogram/client/methods/messages/edit_message_media.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/edit_message_reply_markup.py b/pyrogram/client/methods/messages/edit_message_reply_markup.py index f57ee31d..01c8254a 100644 --- a/pyrogram/client/methods/messages/edit_message_reply_markup.py +++ b/pyrogram/client/methods/messages/edit_message_reply_markup.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/edit_message_text.py b/pyrogram/client/methods/messages/edit_message_text.py index 522ada9c..d850c09f 100644 --- a/pyrogram/client/methods/messages/edit_message_text.py +++ b/pyrogram/client/methods/messages/edit_message_text.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/forward_messages.py b/pyrogram/client/methods/messages/forward_messages.py index b79b1bcc..77bd2b3c 100644 --- a/pyrogram/client/methods/messages/forward_messages.py +++ b/pyrogram/client/methods/messages/forward_messages.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/get_history.py b/pyrogram/client/methods/messages/get_history.py index 3a18d306..ce36dbe0 100644 --- a/pyrogram/client/methods/messages/get_history.py +++ b/pyrogram/client/methods/messages/get_history.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # @@ -45,7 +45,7 @@ class GetHistory(BaseClient): Limits the number of messages to be retrieved. By default, the first 100 messages are returned. - offset (``int``, *optional*) + offset (``int``, *optional*): Sequential number of the first message to be returned. Defaults to 0 (most recent message). Negative values are also accepted and become useful in case you set offset_id or offset_date. diff --git a/pyrogram/client/methods/messages/get_messages.py b/pyrogram/client/methods/messages/get_messages.py index 9a47d256..460f6b59 100644 --- a/pyrogram/client/methods/messages/get_messages.py +++ b/pyrogram/client/methods/messages/get_messages.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/retract_vote.py b/pyrogram/client/methods/messages/retract_vote.py index e0852355..7893f768 100644 --- a/pyrogram/client/methods/messages/retract_vote.py +++ b/pyrogram/client/methods/messages/retract_vote.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_animation.py b/pyrogram/client/methods/messages/send_animation.py index ce1bb319..74a41184 100644 --- a/pyrogram/client/methods/messages/send_animation.py +++ b/pyrogram/client/methods/messages/send_animation.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_audio.py b/pyrogram/client/methods/messages/send_audio.py index f37925be..2cd50b71 100644 --- a/pyrogram/client/methods/messages/send_audio.py +++ b/pyrogram/client/methods/messages/send_audio.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_chat_action.py b/pyrogram/client/methods/messages/send_chat_action.py index 21ff3032..1a4e2e8c 100644 --- a/pyrogram/client/methods/messages/send_chat_action.py +++ b/pyrogram/client/methods/messages/send_chat_action.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_contact.py b/pyrogram/client/methods/messages/send_contact.py index 2105e550..5e25b6ae 100644 --- a/pyrogram/client/methods/messages/send_contact.py +++ b/pyrogram/client/methods/messages/send_contact.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_document.py b/pyrogram/client/methods/messages/send_document.py index 60a57f95..13190d4c 100644 --- a/pyrogram/client/methods/messages/send_document.py +++ b/pyrogram/client/methods/messages/send_document.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_location.py b/pyrogram/client/methods/messages/send_location.py index 88aeb7d9..8140147a 100644 --- a/pyrogram/client/methods/messages/send_location.py +++ b/pyrogram/client/methods/messages/send_location.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_media_group.py b/pyrogram/client/methods/messages/send_media_group.py index 72a937b9..92a838c9 100644 --- a/pyrogram/client/methods/messages/send_media_group.py +++ b/pyrogram/client/methods/messages/send_media_group.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_message.py b/pyrogram/client/methods/messages/send_message.py index 3251ece6..8c092875 100644 --- a/pyrogram/client/methods/messages/send_message.py +++ b/pyrogram/client/methods/messages/send_message.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_photo.py b/pyrogram/client/methods/messages/send_photo.py index 13023628..db182301 100644 --- a/pyrogram/client/methods/messages/send_photo.py +++ b/pyrogram/client/methods/messages/send_photo.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_poll.py b/pyrogram/client/methods/messages/send_poll.py index 33f44767..8e938a1a 100644 --- a/pyrogram/client/methods/messages/send_poll.py +++ b/pyrogram/client/methods/messages/send_poll.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_sticker.py b/pyrogram/client/methods/messages/send_sticker.py index 19404535..7dbb45af 100644 --- a/pyrogram/client/methods/messages/send_sticker.py +++ b/pyrogram/client/methods/messages/send_sticker.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_venue.py b/pyrogram/client/methods/messages/send_venue.py index 36da7e18..c7a4f139 100644 --- a/pyrogram/client/methods/messages/send_venue.py +++ b/pyrogram/client/methods/messages/send_venue.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_video.py b/pyrogram/client/methods/messages/send_video.py index d4ab9551..63e3735e 100644 --- a/pyrogram/client/methods/messages/send_video.py +++ b/pyrogram/client/methods/messages/send_video.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_video_note.py b/pyrogram/client/methods/messages/send_video_note.py index f00d26a0..ce6b0234 100644 --- a/pyrogram/client/methods/messages/send_video_note.py +++ b/pyrogram/client/methods/messages/send_video_note.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/send_voice.py b/pyrogram/client/methods/messages/send_voice.py index 037cd64e..74f74df0 100644 --- a/pyrogram/client/methods/messages/send_voice.py +++ b/pyrogram/client/methods/messages/send_voice.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/messages/vote_poll.py b/pyrogram/client/methods/messages/vote_poll.py index 3404a7bd..9e400e62 100644 --- a/pyrogram/client/methods/messages/vote_poll.py +++ b/pyrogram/client/methods/messages/vote_poll.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/password/__init__.py b/pyrogram/client/methods/password/__init__.py index 07d8dd7d..8a29b0a4 100644 --- a/pyrogram/client/methods/password/__init__.py +++ b/pyrogram/client/methods/password/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/password/change_cloud_password.py b/pyrogram/client/methods/password/change_cloud_password.py index 94b9f568..139d5b9f 100644 --- a/pyrogram/client/methods/password/change_cloud_password.py +++ b/pyrogram/client/methods/password/change_cloud_password.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/password/enable_cloud_password.py b/pyrogram/client/methods/password/enable_cloud_password.py index c9b17660..b14d85ef 100644 --- a/pyrogram/client/methods/password/enable_cloud_password.py +++ b/pyrogram/client/methods/password/enable_cloud_password.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/password/remove_cloud_password.py b/pyrogram/client/methods/password/remove_cloud_password.py index dddb5e68..444457df 100644 --- a/pyrogram/client/methods/password/remove_cloud_password.py +++ b/pyrogram/client/methods/password/remove_cloud_password.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/password/utils.py b/pyrogram/client/methods/password/utils.py index 01c3fe49..24c4dd28 100644 --- a/pyrogram/client/methods/password/utils.py +++ b/pyrogram/client/methods/password/utils.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/users/__init__.py b/pyrogram/client/methods/users/__init__.py index 11f51d19..db5e5869 100644 --- a/pyrogram/client/methods/users/__init__.py +++ b/pyrogram/client/methods/users/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/users/delete_user_profile_photos.py b/pyrogram/client/methods/users/delete_user_profile_photos.py index 5070d2bf..057b74f4 100644 --- a/pyrogram/client/methods/users/delete_user_profile_photos.py +++ b/pyrogram/client/methods/users/delete_user_profile_photos.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/users/get_me.py b/pyrogram/client/methods/users/get_me.py index 11dd657f..09caabf7 100644 --- a/pyrogram/client/methods/users/get_me.py +++ b/pyrogram/client/methods/users/get_me.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/users/get_user_profile_photos.py b/pyrogram/client/methods/users/get_user_profile_photos.py index 375eba8e..0d0d90bf 100644 --- a/pyrogram/client/methods/users/get_user_profile_photos.py +++ b/pyrogram/client/methods/users/get_user_profile_photos.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/users/get_users.py b/pyrogram/client/methods/users/get_users.py index b8a331f6..6b9fbd45 100644 --- a/pyrogram/client/methods/users/get_users.py +++ b/pyrogram/client/methods/users/get_users.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/methods/users/set_user_profile_photo.py b/pyrogram/client/methods/users/set_user_profile_photo.py index f2a2c302..0863c695 100644 --- a/pyrogram/client/methods/users/set_user_profile_photo.py +++ b/pyrogram/client/methods/users/set_user_profile_photo.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/style/__init__.py b/pyrogram/client/style/__init__.py index e60b4da1..768cee7b 100644 --- a/pyrogram/client/style/__init__.py +++ b/pyrogram/client/style/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/style/html.py b/pyrogram/client/style/html.py index ec839fcd..0014c4d9 100644 --- a/pyrogram/client/style/html.py +++ b/pyrogram/client/style/html.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/style/markdown.py b/pyrogram/client/style/markdown.py index f1ea23fc..7bd96ed6 100644 --- a/pyrogram/client/style/markdown.py +++ b/pyrogram/client/style/markdown.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/style/utils.py b/pyrogram/client/style/utils.py index 6a0a9667..b001f1cf 100644 --- a/pyrogram/client/style/utils.py +++ b/pyrogram/client/style/utils.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/__init__.py b/pyrogram/client/types/__init__.py index 7b30670f..0f4628ce 100644 --- a/pyrogram/client/types/__init__.py +++ b/pyrogram/client/types/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # @@ -37,3 +37,4 @@ from .user_and_chats import ( Chat, ChatMember, ChatMembers, ChatPhoto, Dialog, Dialogs, User, UserStatus, ChatPreview ) +from .update import StopPropagation diff --git a/pyrogram/client/types/bots/__init__.py b/pyrogram/client/types/bots/__init__.py index 9f7cc7e6..28cfe724 100644 --- a/pyrogram/client/types/bots/__init__.py +++ b/pyrogram/client/types/bots/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/bots/callback_query.py b/pyrogram/client/types/bots/callback_query.py index 3c046cf9..b1ff95e1 100644 --- a/pyrogram/client/types/bots/callback_query.py +++ b/pyrogram/client/types/bots/callback_query.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # @@ -22,10 +22,11 @@ from struct import pack import pyrogram from pyrogram.api import types from ..pyrogram_type import PyrogramType +from ..update import Update from ..user_and_chats import User -class CallbackQuery(PyrogramType): +class CallbackQuery(PyrogramType, Update): """This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), diff --git a/pyrogram/client/types/bots/force_reply.py b/pyrogram/client/types/bots/force_reply.py index 0c15b92a..2e5c2f42 100644 --- a/pyrogram/client/types/bots/force_reply.py +++ b/pyrogram/client/types/bots/force_reply.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/bots/inline_keyboard_button.py b/pyrogram/client/types/bots/inline_keyboard_button.py index 655e78f4..f9c1267a 100644 --- a/pyrogram/client/types/bots/inline_keyboard_button.py +++ b/pyrogram/client/types/bots/inline_keyboard_button.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/bots/inline_keyboard_markup.py b/pyrogram/client/types/bots/inline_keyboard_markup.py index d958f306..f18bd605 100644 --- a/pyrogram/client/types/bots/inline_keyboard_markup.py +++ b/pyrogram/client/types/bots/inline_keyboard_markup.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/bots/keyboard_button.py b/pyrogram/client/types/bots/keyboard_button.py index 4b025375..e93eccb3 100644 --- a/pyrogram/client/types/bots/keyboard_button.py +++ b/pyrogram/client/types/bots/keyboard_button.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/bots/reply_keyboard_markup.py b/pyrogram/client/types/bots/reply_keyboard_markup.py index 85f38b10..7840dbe5 100644 --- a/pyrogram/client/types/bots/reply_keyboard_markup.py +++ b/pyrogram/client/types/bots/reply_keyboard_markup.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/bots/reply_keyboard_remove.py b/pyrogram/client/types/bots/reply_keyboard_remove.py index def9917c..5b67fbb4 100644 --- a/pyrogram/client/types/bots/reply_keyboard_remove.py +++ b/pyrogram/client/types/bots/reply_keyboard_remove.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/input_media/__init__.py b/pyrogram/client/types/input_media/__init__.py index 5f5be30d..e2e0b0f6 100644 --- a/pyrogram/client/types/input_media/__init__.py +++ b/pyrogram/client/types/input_media/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/input_media/input_media.py b/pyrogram/client/types/input_media/input_media.py index 7a380f89..f55d8aa0 100644 --- a/pyrogram/client/types/input_media/input_media.py +++ b/pyrogram/client/types/input_media/input_media.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/input_media/input_media_animation.py b/pyrogram/client/types/input_media/input_media_animation.py index 0e7b2433..af0c2b2a 100644 --- a/pyrogram/client/types/input_media/input_media_animation.py +++ b/pyrogram/client/types/input_media/input_media_animation.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/input_media/input_media_audio.py b/pyrogram/client/types/input_media/input_media_audio.py index 455c2292..5034ed06 100644 --- a/pyrogram/client/types/input_media/input_media_audio.py +++ b/pyrogram/client/types/input_media/input_media_audio.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/input_media/input_media_document.py b/pyrogram/client/types/input_media/input_media_document.py index 08fcae5b..25e17d0f 100644 --- a/pyrogram/client/types/input_media/input_media_document.py +++ b/pyrogram/client/types/input_media/input_media_document.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/input_media/input_media_photo.py b/pyrogram/client/types/input_media/input_media_photo.py index c8cdccb8..5917fbf0 100644 --- a/pyrogram/client/types/input_media/input_media_photo.py +++ b/pyrogram/client/types/input_media/input_media_photo.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/input_media/input_media_video.py b/pyrogram/client/types/input_media/input_media_video.py index 955cf633..6fa7936e 100644 --- a/pyrogram/client/types/input_media/input_media_video.py +++ b/pyrogram/client/types/input_media/input_media_video.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/input_media/input_phone_contact.py b/pyrogram/client/types/input_media/input_phone_contact.py index eacecaf8..1a89759a 100644 --- a/pyrogram/client/types/input_media/input_phone_contact.py +++ b/pyrogram/client/types/input_media/input_phone_contact.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/__init__.py b/pyrogram/client/types/messages_and_media/__init__.py index d402ae48..b6847bdb 100644 --- a/pyrogram/client/types/messages_and_media/__init__.py +++ b/pyrogram/client/types/messages_and_media/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/animation.py b/pyrogram/client/types/messages_and_media/animation.py index 6b7f7cf7..d5661ea8 100644 --- a/pyrogram/client/types/messages_and_media/animation.py +++ b/pyrogram/client/types/messages_and_media/animation.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/audio.py b/pyrogram/client/types/messages_and_media/audio.py index 148ae805..cfecceae 100644 --- a/pyrogram/client/types/messages_and_media/audio.py +++ b/pyrogram/client/types/messages_and_media/audio.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/contact.py b/pyrogram/client/types/messages_and_media/contact.py index 16dd52bb..51acb59f 100644 --- a/pyrogram/client/types/messages_and_media/contact.py +++ b/pyrogram/client/types/messages_and_media/contact.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/document.py b/pyrogram/client/types/messages_and_media/document.py index db41df6c..e84b5149 100644 --- a/pyrogram/client/types/messages_and_media/document.py +++ b/pyrogram/client/types/messages_and_media/document.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/location.py b/pyrogram/client/types/messages_and_media/location.py index fcdd5e31..64acdbf5 100644 --- a/pyrogram/client/types/messages_and_media/location.py +++ b/pyrogram/client/types/messages_and_media/location.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/message.py b/pyrogram/client/types/messages_and_media/message.py index 184f910e..1b657963 100644 --- a/pyrogram/client/types/messages_and_media/message.py +++ b/pyrogram/client/types/messages_and_media/message.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # @@ -26,11 +26,12 @@ from .location import Location from .message_entity import MessageEntity from ..messages_and_media.photo import Photo from ..pyrogram_type import PyrogramType +from ..update import Update from ..user_and_chats.chat import Chat from ..user_and_chats.user import User -class Message(PyrogramType): +class Message(PyrogramType, Update): """This object represents a message. Args: diff --git a/pyrogram/client/types/messages_and_media/message_entity.py b/pyrogram/client/types/messages_and_media/message_entity.py index 7544424c..88beeb2f 100644 --- a/pyrogram/client/types/messages_and_media/message_entity.py +++ b/pyrogram/client/types/messages_and_media/message_entity.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/messages.py b/pyrogram/client/types/messages_and_media/messages.py index 46e3aee2..eac9b8b9 100644 --- a/pyrogram/client/types/messages_and_media/messages.py +++ b/pyrogram/client/types/messages_and_media/messages.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # @@ -22,10 +22,11 @@ import pyrogram from pyrogram.api import types from .message import Message from ..pyrogram_type import PyrogramType +from ..update import Update from ..user_and_chats import Chat -class Messages(PyrogramType): +class Messages(PyrogramType, Update): """This object represents a chat's messages. Args: diff --git a/pyrogram/client/types/messages_and_media/photo.py b/pyrogram/client/types/messages_and_media/photo.py index a52a7aa2..72187761 100644 --- a/pyrogram/client/types/messages_and_media/photo.py +++ b/pyrogram/client/types/messages_and_media/photo.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/photo_size.py b/pyrogram/client/types/messages_and_media/photo_size.py index 7a4db1c2..05f00455 100644 --- a/pyrogram/client/types/messages_and_media/photo_size.py +++ b/pyrogram/client/types/messages_and_media/photo_size.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/poll.py b/pyrogram/client/types/messages_and_media/poll.py index ab59b1ad..72735c28 100644 --- a/pyrogram/client/types/messages_and_media/poll.py +++ b/pyrogram/client/types/messages_and_media/poll.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/poll_option.py b/pyrogram/client/types/messages_and_media/poll_option.py index 240368fc..227fe74f 100644 --- a/pyrogram/client/types/messages_and_media/poll_option.py +++ b/pyrogram/client/types/messages_and_media/poll_option.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/sticker.py b/pyrogram/client/types/messages_and_media/sticker.py index c84acd23..dd16f117 100644 --- a/pyrogram/client/types/messages_and_media/sticker.py +++ b/pyrogram/client/types/messages_and_media/sticker.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/user_profile_photos.py b/pyrogram/client/types/messages_and_media/user_profile_photos.py index 2bfd29c8..8f8525cc 100644 --- a/pyrogram/client/types/messages_and_media/user_profile_photos.py +++ b/pyrogram/client/types/messages_and_media/user_profile_photos.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/venue.py b/pyrogram/client/types/messages_and_media/venue.py index 443f479a..91b3455a 100644 --- a/pyrogram/client/types/messages_and_media/venue.py +++ b/pyrogram/client/types/messages_and_media/venue.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/video.py b/pyrogram/client/types/messages_and_media/video.py index 2c476b39..553e8171 100644 --- a/pyrogram/client/types/messages_and_media/video.py +++ b/pyrogram/client/types/messages_and_media/video.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/video_note.py b/pyrogram/client/types/messages_and_media/video_note.py index 718432fa..bfb88c8d 100644 --- a/pyrogram/client/types/messages_and_media/video_note.py +++ b/pyrogram/client/types/messages_and_media/video_note.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/messages_and_media/voice.py b/pyrogram/client/types/messages_and_media/voice.py index b9f799b3..e6bba45b 100644 --- a/pyrogram/client/types/messages_and_media/voice.py +++ b/pyrogram/client/types/messages_and_media/voice.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/pyrogram_type.py b/pyrogram/client/types/pyrogram_type.py index f5502a72..3708cdc5 100644 --- a/pyrogram/client/types/pyrogram_type.py +++ b/pyrogram/client/types/pyrogram_type.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/update.py b/pyrogram/client/types/update.py new file mode 100644 index 00000000..80c233c0 --- /dev/null +++ b/pyrogram/client/types/update.py @@ -0,0 +1,26 @@ +# Pyrogram - Telegram MTProto API Client Library for Python +# Copyright (C) 2017-2019 Dan Tès +# +# This file is part of Pyrogram. +# +# Pyrogram is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Pyrogram is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Pyrogram. If not, see . + + +class StopPropagation(StopIteration): + pass + + +class Update: + def stop_propagation(self): + raise StopPropagation diff --git a/pyrogram/client/types/user_and_chats/__init__.py b/pyrogram/client/types/user_and_chats/__init__.py index ec082dfe..24a9a51b 100644 --- a/pyrogram/client/types/user_and_chats/__init__.py +++ b/pyrogram/client/types/user_and_chats/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/user_and_chats/chat.py b/pyrogram/client/types/user_and_chats/chat.py index 7b4240dd..ec30b866 100644 --- a/pyrogram/client/types/user_and_chats/chat.py +++ b/pyrogram/client/types/user_and_chats/chat.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/user_and_chats/chat_member.py b/pyrogram/client/types/user_and_chats/chat_member.py index fa43f526..e901e0e1 100644 --- a/pyrogram/client/types/user_and_chats/chat_member.py +++ b/pyrogram/client/types/user_and_chats/chat_member.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/user_and_chats/chat_members.py b/pyrogram/client/types/user_and_chats/chat_members.py index 838517ab..88219514 100644 --- a/pyrogram/client/types/user_and_chats/chat_members.py +++ b/pyrogram/client/types/user_and_chats/chat_members.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # @@ -59,8 +59,7 @@ class ChatMembers(PyrogramType): total_count = len(members) for member in members: - user = User._parse(client, users[member.user_id]) - chat_members.append(ChatMember._parse(client, member, user)) + chat_members.append(ChatMember._parse(client, member, users[member.user_id])) return ChatMembers( total_count=total_count, diff --git a/pyrogram/client/types/user_and_chats/chat_photo.py b/pyrogram/client/types/user_and_chats/chat_photo.py index ad4b3151..848f7250 100644 --- a/pyrogram/client/types/user_and_chats/chat_photo.py +++ b/pyrogram/client/types/user_and_chats/chat_photo.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/user_and_chats/dialog.py b/pyrogram/client/types/user_and_chats/dialog.py index c001708f..b71caba7 100644 --- a/pyrogram/client/types/user_and_chats/dialog.py +++ b/pyrogram/client/types/user_and_chats/dialog.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/user_and_chats/dialogs.py b/pyrogram/client/types/user_and_chats/dialogs.py index 2492d5e2..394ddd28 100644 --- a/pyrogram/client/types/user_and_chats/dialogs.py +++ b/pyrogram/client/types/user_and_chats/dialogs.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/user_and_chats/user.py b/pyrogram/client/types/user_and_chats/user.py index 354e8a09..c6ee03e8 100644 --- a/pyrogram/client/types/user_and_chats/user.py +++ b/pyrogram/client/types/user_and_chats/user.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/client/types/user_and_chats/user_status.py b/pyrogram/client/types/user_and_chats/user_status.py index 69c1921b..8c936f8e 100644 --- a/pyrogram/client/types/user_and_chats/user_status.py +++ b/pyrogram/client/types/user_and_chats/user_status.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # @@ -20,9 +20,10 @@ import pyrogram from pyrogram.api import types from ..pyrogram_type import PyrogramType +from ..update import Update -class UserStatus(PyrogramType): +class UserStatus(PyrogramType, Update): """This object represents a User status (Last Seen privacy). .. note:: diff --git a/pyrogram/connection/__init__.py b/pyrogram/connection/__init__.py index 4d1ff9f1..731e7456 100644 --- a/pyrogram/connection/__init__.py +++ b/pyrogram/connection/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/connection/connection.py b/pyrogram/connection/connection.py index f53c58de..571e6042 100644 --- a/pyrogram/connection/connection.py +++ b/pyrogram/connection/connection.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/connection/transport/__init__.py b/pyrogram/connection/transport/__init__.py index 1790ee60..80e0d848 100644 --- a/pyrogram/connection/transport/__init__.py +++ b/pyrogram/connection/transport/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/connection/transport/tcp/__init__.py b/pyrogram/connection/transport/tcp/__init__.py index 016e91e4..be3fe650 100644 --- a/pyrogram/connection/transport/tcp/__init__.py +++ b/pyrogram/connection/transport/tcp/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/connection/transport/tcp/tcp.py b/pyrogram/connection/transport/tcp/tcp.py index 62587900..237c5c59 100644 --- a/pyrogram/connection/transport/tcp/tcp.py +++ b/pyrogram/connection/transport/tcp/tcp.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/connection/transport/tcp/tcp_abridged.py b/pyrogram/connection/transport/tcp/tcp_abridged.py index 49bba1c7..a155a9a2 100644 --- a/pyrogram/connection/transport/tcp/tcp_abridged.py +++ b/pyrogram/connection/transport/tcp/tcp_abridged.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/connection/transport/tcp/tcp_abridged_o.py b/pyrogram/connection/transport/tcp/tcp_abridged_o.py index c6d38153..541cd458 100644 --- a/pyrogram/connection/transport/tcp/tcp_abridged_o.py +++ b/pyrogram/connection/transport/tcp/tcp_abridged_o.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/connection/transport/tcp/tcp_full.py b/pyrogram/connection/transport/tcp/tcp_full.py index f6a09953..9404a4aa 100644 --- a/pyrogram/connection/transport/tcp/tcp_full.py +++ b/pyrogram/connection/transport/tcp/tcp_full.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/connection/transport/tcp/tcp_intermediate.py b/pyrogram/connection/transport/tcp/tcp_intermediate.py index 08dd725e..b2ab88a5 100644 --- a/pyrogram/connection/transport/tcp/tcp_intermediate.py +++ b/pyrogram/connection/transport/tcp/tcp_intermediate.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/connection/transport/tcp/tcp_intermediate_o.py b/pyrogram/connection/transport/tcp/tcp_intermediate_o.py index 3aefe341..a6fe92cd 100644 --- a/pyrogram/connection/transport/tcp/tcp_intermediate_o.py +++ b/pyrogram/connection/transport/tcp/tcp_intermediate_o.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/crypto/__init__.py b/pyrogram/crypto/__init__.py index 3112729d..f739c1d1 100644 --- a/pyrogram/crypto/__init__.py +++ b/pyrogram/crypto/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/crypto/aes.py b/pyrogram/crypto/aes.py index f16688c4..de275bd0 100644 --- a/pyrogram/crypto/aes.py +++ b/pyrogram/crypto/aes.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/crypto/kdf.py b/pyrogram/crypto/kdf.py index a0da2e2c..56e52339 100644 --- a/pyrogram/crypto/kdf.py +++ b/pyrogram/crypto/kdf.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/crypto/prime.py b/pyrogram/crypto/prime.py index 8e9426ca..a1b76e67 100644 --- a/pyrogram/crypto/prime.py +++ b/pyrogram/crypto/prime.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/crypto/rsa.py b/pyrogram/crypto/rsa.py index 10302dab..26a9092b 100644 --- a/pyrogram/crypto/rsa.py +++ b/pyrogram/crypto/rsa.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/session/__init__.py b/pyrogram/session/__init__.py index afebf563..3a3107c0 100644 --- a/pyrogram/session/__init__.py +++ b/pyrogram/session/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/session/auth.py b/pyrogram/session/auth.py index d159d99d..17b22d6f 100644 --- a/pyrogram/session/auth.py +++ b/pyrogram/session/auth.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/session/internals/__init__.py b/pyrogram/session/internals/__init__.py index 0d28c8f3..272855a7 100644 --- a/pyrogram/session/internals/__init__.py +++ b/pyrogram/session/internals/__init__.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/session/internals/data_center.py b/pyrogram/session/internals/data_center.py index d36e0613..fd51932a 100644 --- a/pyrogram/session/internals/data_center.py +++ b/pyrogram/session/internals/data_center.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/session/internals/msg_factory.py b/pyrogram/session/internals/msg_factory.py index 76a35458..7d922ec3 100644 --- a/pyrogram/session/internals/msg_factory.py +++ b/pyrogram/session/internals/msg_factory.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/session/internals/msg_id.py b/pyrogram/session/internals/msg_id.py index 99aa9d14..3826aaa5 100644 --- a/pyrogram/session/internals/msg_id.py +++ b/pyrogram/session/internals/msg_id.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/session/internals/seq_no.py b/pyrogram/session/internals/seq_no.py index bef0d1a3..ebc3efea 100644 --- a/pyrogram/session/internals/seq_no.py +++ b/pyrogram/session/internals/seq_no.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index fcd8f8e1..7a207741 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. # diff --git a/readthedocs.yml b/readthedocs.yml new file mode 100644 index 00000000..9b172987 --- /dev/null +++ b/readthedocs.yml @@ -0,0 +1,6 @@ +build: + image: latest + +python: + version: 3.6 + setup_py_install: true \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index ccfa89ee..f9c6874c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ pyaes==1.6.1 pysocks==1.6.8 +typing==3.6.6; python_version<"3.5" async_lru==1.0.1 \ No newline at end of file diff --git a/setup.py b/setup.py index 8d1af092..cc2a3880 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ # Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès +# Copyright (C) 2017-2019 Dan Tès # # This file is part of Pyrogram. #