diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py index 29ad17ef..f1442596 100644 --- a/pyrogram/__init__.py +++ b/pyrogram/__init__.py @@ -30,11 +30,9 @@ from .client.types import ( Audio, Chat, ChatMember, ChatMembers, ChatPhoto, Contact, Document, InputMediaPhoto, InputMediaVideo, InputPhoneContact, Location, Message, MessageEntity, Dialog, Dialogs, Photo, PhotoSize, Sticker, Update, User, UserProfilePhotos, - Venue, GIF, Video, VideoNote, Voice, CallbackQuery, Messages -) -from .client.types.reply_markup import ( - ForceReply, InlineKeyboardButton, InlineKeyboardMarkup, - KeyboardButton, ReplyKeyboardMarkup, ReplyKeyboardRemove + Venue, GIF, Video, VideoNote, Voice, CallbackQuery, Messages, ForceReply, + InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, ReplyKeyboardMarkup, + ReplyKeyboardRemove ) from .client import ( Client, ChatAction, ParseMode, Emoji, diff --git a/pyrogram/client/types/__init__.py b/pyrogram/client/types/__init__.py index d99090ef..e6fcc8aa 100644 --- a/pyrogram/client/types/__init__.py +++ b/pyrogram/client/types/__init__.py @@ -16,35 +16,26 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . -from .audio import Audio from .callback_query import CallbackQuery from .chat import Chat from .chat_member import ChatMember from .chat_members import ChatMembers from .chat_photo import ChatPhoto -from .contact import Contact from .dialog import Dialog from .dialogs import Dialogs -from .document import Document -from .gif import GIF from .input_media_photo import InputMediaPhoto from .input_media_video import InputMediaVideo from .input_phone_contact import InputPhoneContact -from .location import Location +from .media import ( + Audio, Contact, Document, GIF, Location, Photo, PhotoSize, + Sticker, Venue, Video, VideoNote, Voice, UserProfilePhotos +) from .message import Message from .message_entity import MessageEntity from .messages import Messages -from .photo import Photo -from .photo_size import PhotoSize from .reply_markup import ( ForceReply, InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, ReplyKeyboardMarkup, ReplyKeyboardRemove ) -from .sticker import Sticker from .update import Update from .user import User -from .user_profile_photos import UserProfilePhotos -from .venue import Venue -from .video import Video -from .video_note import VideoNote -from .voice import Voice diff --git a/pyrogram/client/types/media/__init__.py b/pyrogram/client/types/media/__init__.py new file mode 100644 index 00000000..5b09d832 --- /dev/null +++ b/pyrogram/client/types/media/__init__.py @@ -0,0 +1,31 @@ +# 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 .audio import Audio +from .contact import Contact +from .document import Document +from .gif import GIF +from .location import Location +from .photo import Photo +from .photo_size import PhotoSize +from .sticker import Sticker +from .user_profile_photos import UserProfilePhotos +from .venue import Venue +from .video import Video +from .video_note import VideoNote +from .voice import Voice diff --git a/pyrogram/client/types/audio.py b/pyrogram/client/types/media/audio.py similarity index 100% rename from pyrogram/client/types/audio.py rename to pyrogram/client/types/media/audio.py diff --git a/pyrogram/client/types/contact.py b/pyrogram/client/types/media/contact.py similarity index 100% rename from pyrogram/client/types/contact.py rename to pyrogram/client/types/media/contact.py diff --git a/pyrogram/client/types/document.py b/pyrogram/client/types/media/document.py similarity index 100% rename from pyrogram/client/types/document.py rename to pyrogram/client/types/media/document.py diff --git a/pyrogram/client/types/gif.py b/pyrogram/client/types/media/gif.py similarity index 100% rename from pyrogram/client/types/gif.py rename to pyrogram/client/types/media/gif.py diff --git a/pyrogram/client/types/location.py b/pyrogram/client/types/media/location.py similarity index 100% rename from pyrogram/client/types/location.py rename to pyrogram/client/types/media/location.py diff --git a/pyrogram/client/types/photo.py b/pyrogram/client/types/media/photo.py similarity index 100% rename from pyrogram/client/types/photo.py rename to pyrogram/client/types/media/photo.py diff --git a/pyrogram/client/types/photo_size.py b/pyrogram/client/types/media/photo_size.py similarity index 100% rename from pyrogram/client/types/photo_size.py rename to pyrogram/client/types/media/photo_size.py diff --git a/pyrogram/client/types/sticker.py b/pyrogram/client/types/media/sticker.py similarity index 100% rename from pyrogram/client/types/sticker.py rename to pyrogram/client/types/media/sticker.py diff --git a/pyrogram/client/types/user_profile_photos.py b/pyrogram/client/types/media/user_profile_photos.py similarity index 100% rename from pyrogram/client/types/user_profile_photos.py rename to pyrogram/client/types/media/user_profile_photos.py diff --git a/pyrogram/client/types/venue.py b/pyrogram/client/types/media/venue.py similarity index 100% rename from pyrogram/client/types/venue.py rename to pyrogram/client/types/media/venue.py diff --git a/pyrogram/client/types/video.py b/pyrogram/client/types/media/video.py similarity index 100% rename from pyrogram/client/types/video.py rename to pyrogram/client/types/media/video.py diff --git a/pyrogram/client/types/video_note.py b/pyrogram/client/types/media/video_note.py similarity index 100% rename from pyrogram/client/types/video_note.py rename to pyrogram/client/types/media/video_note.py diff --git a/pyrogram/client/types/voice.py b/pyrogram/client/types/media/voice.py similarity index 100% rename from pyrogram/client/types/voice.py rename to pyrogram/client/types/media/voice.py