diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py index b1a5430c..6ea6aa5c 100644 --- a/pyrogram/__init__.py +++ b/pyrogram/__init__.py @@ -29,7 +29,7 @@ from .api.errors import Error from .client.types import ( Audio, Chat, ChatMember, ChatMembers, ChatPhoto, Contact, Document, InputMediaPhoto, InputMediaVideo, InputMediaDocument, InputMediaAudio, InputMediaAnimation, InputPhoneContact, - Location, Message, MessageEntity, Dialog, Dialogs, Photo, PhotoSize, Sticker, Update, User, UserStatus, + Location, Message, MessageEntity, Dialog, Dialogs, Photo, PhotoSize, Sticker, User, UserStatus, UserProfilePhotos, Venue, Animation, Video, VideoNote, Voice, CallbackQuery, Messages, ForceReply, InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, ReplyKeyboardMarkup, ReplyKeyboardRemove ) diff --git a/pyrogram/client/types/__init__.py b/pyrogram/client/types/__init__.py index 74c97ca1..8289a947 100644 --- a/pyrogram/client/types/__init__.py +++ b/pyrogram/client/types/__init__.py @@ -33,7 +33,6 @@ from .messages_and_media import ( Sticker, Venue, Video, VideoNote, Voice, UserProfilePhotos, Message, Messages, MessageEntity ) -from .update import Update from .user_and_chats import ( Chat, ChatMember, ChatMembers, ChatPhoto, Dialog, Dialogs, User, UserStatus diff --git a/pyrogram/client/types/update.py b/pyrogram/client/types/update.py deleted file mode 100644 index 748108de..00000000 --- a/pyrogram/client/types/update.py +++ /dev/null @@ -1,94 +0,0 @@ -# Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 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 . - -from pyrogram.api.core import Object - - -class Update(Object): - """This object represents an incoming update. - At most one of the optional parameters can be present in any given update. - - Args: - message (:obj:`Message `, *optional*): - New incoming message of any kind — text, photo, sticker, etc. - - edited_message (:obj:`Message `, *optional*): - New version of a message that is known to the bot and was edited. - - deleted_messages (:obj:`Messages `, *optional*): - Deleted messages. - - channel_post (:obj:`Message `, *optional*): - New incoming channel post of any kind — text, photo, sticker, etc. - - edited_channel_post (:obj:`Message `, *optional*): - New version of a channel post that is known to the bot and was edited. - - deleted_channel_posts (:obj:`Messages `, *optional*): - Deleted channel posts. - - inline_query (:obj:`InlineQuery `, *optional*): - New incoming inline query. - - chosen_inline_result (:obj:`ChosenInlineResult `, *optional*): - The result of an inline query that was chosen by a user and sent to their chat partner. - Please see our documentation on the feedback collecting for details on how to enable these updates - for your bot. - - callback_query (:obj:`CallbackQuery `, *optional*): - New incoming callback query. - - shipping_query (:obj:`ShippingQuery `, *optional*): - New incoming shipping query. Only for invoices with flexible price. - - pre_checkout_query (:obj:`PreCheckoutQuery `, *optional*): - New incoming pre-checkout query. Contains full information about checkout. - - user_status (:obj:`UserStatus `, *optional*): - User status (last seen date) update. - """ - - ID = 0xb0700000 - - def __init__( - self, - message=None, - edited_message=None, - deleted_messages=None, - channel_post=None, - edited_channel_post=None, - deleted_channel_posts=None, - inline_query=None, - chosen_inline_result=None, - callback_query=None, - shipping_query=None, - pre_checkout_query=None, - user_status=None - ): - self.message = message - self.edited_message = edited_message - self.deleted_messages = deleted_messages - self.channel_post = channel_post - self.edited_channel_post = edited_channel_post - self.deleted_channel_posts = deleted_channel_posts - self.inline_query = inline_query - self.chosen_inline_result = chosen_inline_result - self.callback_query = callback_query - self.shipping_query = shipping_query - self.pre_checkout_query = pre_checkout_query - self.user_status = user_status