diff --git a/telegram/__init__.py b/telegram/__init__.py index 388cd851a..10c90cc7a 100644 --- a/telegram/__init__.py +++ b/telegram/__init__.py @@ -18,23 +18,19 @@ # along with this program. If not, see [http://www.gnu.org/licenses/]. """A library that provides a Python interface to the Telegram Bot API""" -from sys import version_info -import sys -import os - from .base import TelegramObject from .user import User from .chat import Chat from .chatmember import ChatMember -from .photosize import PhotoSize -from .audio import Audio -from .voice import Voice -from .document import Document -from .sticker import Sticker -from .video import Video -from .contact import Contact -from .location import Location -from .venue import Venue +from .files.photosize import PhotoSize +from .files.audio import Audio +from .files.voice import Voice +from .files.document import Document +from .files.sticker import Sticker +from .files.video import Video +from .files.contact import Contact +from .files.location import Location +from .files.venue import Venue from .chataction import ChatAction from .userprofilephotos import UserProfilePhotos from .keyboardbutton import KeyboardButton @@ -43,56 +39,56 @@ from .replykeyboardmarkup import ReplyKeyboardMarkup from .replykeyboardremove import ReplyKeyboardRemove, ReplyKeyboardHide from .forcereply import ForceReply from .error import TelegramError -from .inputfile import InputFile -from .file import File +from .files.inputfile import InputFile +from .files.file import File from .emoji import Emoji from .parsemode import ParseMode from .messageentity import MessageEntity -from .animation import Animation -from .game import Game -from .shippingaddress import ShippingAddress -from .orderinfo import OrderInfo -from .successfulpayment import SuccessfulPayment -from .invoice import Invoice +from .games.animation import Animation +from .games.game import Game +from .payment.shippingaddress import ShippingAddress +from .payment.orderinfo import OrderInfo +from .payment.successfulpayment import SuccessfulPayment +from .payment.invoice import Invoice from .message import Message -from .inputmessagecontent import InputMessageContent from .callbackquery import CallbackQuery from .choseninlineresult import ChosenInlineResult -from .inlinekeyboardbutton import InlineKeyboardButton -from .inlinekeyboardmarkup import InlineKeyboardMarkup -from .inlinequery import InlineQuery -from .inlinequeryresult import InlineQueryResult -from .inlinequeryresultarticle import InlineQueryResultArticle -from .inlinequeryresultaudio import InlineQueryResultAudio -from .inlinequeryresultcachedaudio import InlineQueryResultCachedAudio -from .inlinequeryresultcacheddocument import InlineQueryResultCachedDocument -from .inlinequeryresultcachedgif import InlineQueryResultCachedGif -from .inlinequeryresultcachedmpeg4gif import InlineQueryResultCachedMpeg4Gif -from .inlinequeryresultcachedphoto import InlineQueryResultCachedPhoto -from .inlinequeryresultcachedsticker import InlineQueryResultCachedSticker -from .inlinequeryresultcachedvideo import InlineQueryResultCachedVideo -from .inlinequeryresultcachedvoice import InlineQueryResultCachedVoice -from .inlinequeryresultcontact import InlineQueryResultContact -from .inlinequeryresultdocument import InlineQueryResultDocument -from .inlinequeryresultgif import InlineQueryResultGif -from .inlinequeryresultlocation import InlineQueryResultLocation -from .inlinequeryresultmpeg4gif import InlineQueryResultMpeg4Gif -from .inlinequeryresultphoto import InlineQueryResultPhoto -from .inlinequeryresultvenue import InlineQueryResultVenue -from .inlinequeryresultvideo import InlineQueryResultVideo -from .inlinequeryresultvoice import InlineQueryResultVoice -from .inlinequeryresultgame import InlineQueryResultGame -from .inputtextmessagecontent import InputTextMessageContent -from .inputlocationmessagecontent import InputLocationMessageContent -from .inputvenuemessagecontent import InputVenueMessageContent -from .inputcontactmessagecontent import InputContactMessageContent -from .labeledprice import LabeledPrice -from .shippingoption import ShippingOption -from .precheckoutquery import PreCheckoutQuery -from .shippingquery import ShippingQuery +from .inline.inlinekeyboardbutton import InlineKeyboardButton +from .inline.inlinekeyboardmarkup import InlineKeyboardMarkup +from .inline.inputmessagecontent import InputMessageContent +from .inline.inlinequery import InlineQuery +from .inline.inlinequeryresult import InlineQueryResult +from .inline.inlinequeryresultarticle import InlineQueryResultArticle +from .inline.inlinequeryresultaudio import InlineQueryResultAudio +from .inline.inlinequeryresultcachedaudio import InlineQueryResultCachedAudio +from .inline.inlinequeryresultcacheddocument import InlineQueryResultCachedDocument +from .inline.inlinequeryresultcachedgif import InlineQueryResultCachedGif +from .inline.inlinequeryresultcachedmpeg4gif import InlineQueryResultCachedMpeg4Gif +from .inline.inlinequeryresultcachedphoto import InlineQueryResultCachedPhoto +from .inline.inlinequeryresultcachedsticker import InlineQueryResultCachedSticker +from .inline.inlinequeryresultcachedvideo import InlineQueryResultCachedVideo +from .inline.inlinequeryresultcachedvoice import InlineQueryResultCachedVoice +from .inline.inlinequeryresultcontact import InlineQueryResultContact +from .inline.inlinequeryresultdocument import InlineQueryResultDocument +from .inline.inlinequeryresultgif import InlineQueryResultGif +from .inline.inlinequeryresultlocation import InlineQueryResultLocation +from .inline.inlinequeryresultmpeg4gif import InlineQueryResultMpeg4Gif +from .inline.inlinequeryresultphoto import InlineQueryResultPhoto +from .inline.inlinequeryresultvenue import InlineQueryResultVenue +from .inline.inlinequeryresultvideo import InlineQueryResultVideo +from .inline.inlinequeryresultvoice import InlineQueryResultVoice +from .inline.inlinequeryresultgame import InlineQueryResultGame +from .inline.inputtextmessagecontent import InputTextMessageContent +from .inline.inputlocationmessagecontent import InputLocationMessageContent +from .inline.inputvenuemessagecontent import InputVenueMessageContent +from .inline.inputcontactmessagecontent import InputContactMessageContent +from .payment.labeledprice import LabeledPrice +from .payment.shippingoption import ShippingOption +from .payment.precheckoutquery import PreCheckoutQuery +from .payment.shippingquery import ShippingQuery from .webhookinfo import WebhookInfo -from .gamehighscore import GameHighScore -from .videonote import VideoNote +from .games.gamehighscore import GameHighScore +from .files.videonote import VideoNote from .update import Update from .bot import Bot from .constants import (MAX_MESSAGE_LENGTH, MAX_CAPTION_LENGTH, SUPPORTED_WEBHOOK_PORTS, diff --git a/telegram/files/__init__.py b/telegram/files/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/telegram/audio.py b/telegram/files/audio.py similarity index 100% rename from telegram/audio.py rename to telegram/files/audio.py diff --git a/telegram/contact.py b/telegram/files/contact.py similarity index 100% rename from telegram/contact.py rename to telegram/files/contact.py diff --git a/telegram/document.py b/telegram/files/document.py similarity index 100% rename from telegram/document.py rename to telegram/files/document.py diff --git a/telegram/file.py b/telegram/files/file.py similarity index 100% rename from telegram/file.py rename to telegram/files/file.py diff --git a/telegram/inputfile.py b/telegram/files/inputfile.py similarity index 100% rename from telegram/inputfile.py rename to telegram/files/inputfile.py diff --git a/telegram/location.py b/telegram/files/location.py similarity index 100% rename from telegram/location.py rename to telegram/files/location.py diff --git a/telegram/photosize.py b/telegram/files/photosize.py similarity index 100% rename from telegram/photosize.py rename to telegram/files/photosize.py diff --git a/telegram/sticker.py b/telegram/files/sticker.py similarity index 100% rename from telegram/sticker.py rename to telegram/files/sticker.py diff --git a/telegram/venue.py b/telegram/files/venue.py similarity index 100% rename from telegram/venue.py rename to telegram/files/venue.py diff --git a/telegram/video.py b/telegram/files/video.py similarity index 100% rename from telegram/video.py rename to telegram/files/video.py diff --git a/telegram/videonote.py b/telegram/files/videonote.py similarity index 100% rename from telegram/videonote.py rename to telegram/files/videonote.py diff --git a/telegram/voice.py b/telegram/files/voice.py similarity index 100% rename from telegram/voice.py rename to telegram/files/voice.py diff --git a/telegram/games/__init__.py b/telegram/games/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/telegram/animation.py b/telegram/games/animation.py similarity index 100% rename from telegram/animation.py rename to telegram/games/animation.py diff --git a/telegram/callbackgame.py b/telegram/games/callbackgame.py similarity index 100% rename from telegram/callbackgame.py rename to telegram/games/callbackgame.py diff --git a/telegram/game.py b/telegram/games/game.py similarity index 100% rename from telegram/game.py rename to telegram/games/game.py diff --git a/telegram/gamehighscore.py b/telegram/games/gamehighscore.py similarity index 100% rename from telegram/gamehighscore.py rename to telegram/games/gamehighscore.py diff --git a/telegram/inline/__init__.py b/telegram/inline/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/telegram/inlinekeyboardbutton.py b/telegram/inline/inlinekeyboardbutton.py similarity index 100% rename from telegram/inlinekeyboardbutton.py rename to telegram/inline/inlinekeyboardbutton.py diff --git a/telegram/inlinekeyboardmarkup.py b/telegram/inline/inlinekeyboardmarkup.py similarity index 100% rename from telegram/inlinekeyboardmarkup.py rename to telegram/inline/inlinekeyboardmarkup.py diff --git a/telegram/inlinequery.py b/telegram/inline/inlinequery.py similarity index 100% rename from telegram/inlinequery.py rename to telegram/inline/inlinequery.py diff --git a/telegram/inlinequeryresult.py b/telegram/inline/inlinequeryresult.py similarity index 100% rename from telegram/inlinequeryresult.py rename to telegram/inline/inlinequeryresult.py diff --git a/telegram/inlinequeryresultarticle.py b/telegram/inline/inlinequeryresultarticle.py similarity index 100% rename from telegram/inlinequeryresultarticle.py rename to telegram/inline/inlinequeryresultarticle.py diff --git a/telegram/inlinequeryresultaudio.py b/telegram/inline/inlinequeryresultaudio.py similarity index 100% rename from telegram/inlinequeryresultaudio.py rename to telegram/inline/inlinequeryresultaudio.py diff --git a/telegram/inlinequeryresultcachedaudio.py b/telegram/inline/inlinequeryresultcachedaudio.py similarity index 100% rename from telegram/inlinequeryresultcachedaudio.py rename to telegram/inline/inlinequeryresultcachedaudio.py diff --git a/telegram/inlinequeryresultcacheddocument.py b/telegram/inline/inlinequeryresultcacheddocument.py similarity index 100% rename from telegram/inlinequeryresultcacheddocument.py rename to telegram/inline/inlinequeryresultcacheddocument.py diff --git a/telegram/inlinequeryresultcachedgif.py b/telegram/inline/inlinequeryresultcachedgif.py similarity index 100% rename from telegram/inlinequeryresultcachedgif.py rename to telegram/inline/inlinequeryresultcachedgif.py diff --git a/telegram/inlinequeryresultcachedmpeg4gif.py b/telegram/inline/inlinequeryresultcachedmpeg4gif.py similarity index 100% rename from telegram/inlinequeryresultcachedmpeg4gif.py rename to telegram/inline/inlinequeryresultcachedmpeg4gif.py diff --git a/telegram/inlinequeryresultcachedphoto.py b/telegram/inline/inlinequeryresultcachedphoto.py similarity index 100% rename from telegram/inlinequeryresultcachedphoto.py rename to telegram/inline/inlinequeryresultcachedphoto.py diff --git a/telegram/inlinequeryresultcachedsticker.py b/telegram/inline/inlinequeryresultcachedsticker.py similarity index 100% rename from telegram/inlinequeryresultcachedsticker.py rename to telegram/inline/inlinequeryresultcachedsticker.py diff --git a/telegram/inlinequeryresultcachedvideo.py b/telegram/inline/inlinequeryresultcachedvideo.py similarity index 100% rename from telegram/inlinequeryresultcachedvideo.py rename to telegram/inline/inlinequeryresultcachedvideo.py diff --git a/telegram/inlinequeryresultcachedvoice.py b/telegram/inline/inlinequeryresultcachedvoice.py similarity index 100% rename from telegram/inlinequeryresultcachedvoice.py rename to telegram/inline/inlinequeryresultcachedvoice.py diff --git a/telegram/inlinequeryresultcontact.py b/telegram/inline/inlinequeryresultcontact.py similarity index 100% rename from telegram/inlinequeryresultcontact.py rename to telegram/inline/inlinequeryresultcontact.py diff --git a/telegram/inlinequeryresultdocument.py b/telegram/inline/inlinequeryresultdocument.py similarity index 100% rename from telegram/inlinequeryresultdocument.py rename to telegram/inline/inlinequeryresultdocument.py diff --git a/telegram/inlinequeryresultgame.py b/telegram/inline/inlinequeryresultgame.py similarity index 100% rename from telegram/inlinequeryresultgame.py rename to telegram/inline/inlinequeryresultgame.py diff --git a/telegram/inlinequeryresultgif.py b/telegram/inline/inlinequeryresultgif.py similarity index 100% rename from telegram/inlinequeryresultgif.py rename to telegram/inline/inlinequeryresultgif.py diff --git a/telegram/inlinequeryresultlocation.py b/telegram/inline/inlinequeryresultlocation.py similarity index 100% rename from telegram/inlinequeryresultlocation.py rename to telegram/inline/inlinequeryresultlocation.py diff --git a/telegram/inlinequeryresultmpeg4gif.py b/telegram/inline/inlinequeryresultmpeg4gif.py similarity index 100% rename from telegram/inlinequeryresultmpeg4gif.py rename to telegram/inline/inlinequeryresultmpeg4gif.py diff --git a/telegram/inlinequeryresultphoto.py b/telegram/inline/inlinequeryresultphoto.py similarity index 100% rename from telegram/inlinequeryresultphoto.py rename to telegram/inline/inlinequeryresultphoto.py diff --git a/telegram/inlinequeryresultvenue.py b/telegram/inline/inlinequeryresultvenue.py similarity index 100% rename from telegram/inlinequeryresultvenue.py rename to telegram/inline/inlinequeryresultvenue.py diff --git a/telegram/inlinequeryresultvideo.py b/telegram/inline/inlinequeryresultvideo.py similarity index 100% rename from telegram/inlinequeryresultvideo.py rename to telegram/inline/inlinequeryresultvideo.py diff --git a/telegram/inlinequeryresultvoice.py b/telegram/inline/inlinequeryresultvoice.py similarity index 100% rename from telegram/inlinequeryresultvoice.py rename to telegram/inline/inlinequeryresultvoice.py diff --git a/telegram/inputcontactmessagecontent.py b/telegram/inline/inputcontactmessagecontent.py similarity index 100% rename from telegram/inputcontactmessagecontent.py rename to telegram/inline/inputcontactmessagecontent.py diff --git a/telegram/inputlocationmessagecontent.py b/telegram/inline/inputlocationmessagecontent.py similarity index 100% rename from telegram/inputlocationmessagecontent.py rename to telegram/inline/inputlocationmessagecontent.py diff --git a/telegram/inputmessagecontent.py b/telegram/inline/inputmessagecontent.py similarity index 100% rename from telegram/inputmessagecontent.py rename to telegram/inline/inputmessagecontent.py diff --git a/telegram/inputtextmessagecontent.py b/telegram/inline/inputtextmessagecontent.py similarity index 100% rename from telegram/inputtextmessagecontent.py rename to telegram/inline/inputtextmessagecontent.py diff --git a/telegram/inputvenuemessagecontent.py b/telegram/inline/inputvenuemessagecontent.py similarity index 100% rename from telegram/inputvenuemessagecontent.py rename to telegram/inline/inputvenuemessagecontent.py diff --git a/telegram/payment/__init__.py b/telegram/payment/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/telegram/invoice.py b/telegram/payment/invoice.py similarity index 100% rename from telegram/invoice.py rename to telegram/payment/invoice.py diff --git a/telegram/labeledprice.py b/telegram/payment/labeledprice.py similarity index 100% rename from telegram/labeledprice.py rename to telegram/payment/labeledprice.py diff --git a/telegram/orderinfo.py b/telegram/payment/orderinfo.py similarity index 100% rename from telegram/orderinfo.py rename to telegram/payment/orderinfo.py diff --git a/telegram/precheckoutquery.py b/telegram/payment/precheckoutquery.py similarity index 100% rename from telegram/precheckoutquery.py rename to telegram/payment/precheckoutquery.py diff --git a/telegram/shippingaddress.py b/telegram/payment/shippingaddress.py similarity index 100% rename from telegram/shippingaddress.py rename to telegram/payment/shippingaddress.py diff --git a/telegram/shippingoption.py b/telegram/payment/shippingoption.py similarity index 100% rename from telegram/shippingoption.py rename to telegram/payment/shippingoption.py diff --git a/telegram/shippingquery.py b/telegram/payment/shippingquery.py similarity index 100% rename from telegram/shippingquery.py rename to telegram/payment/shippingquery.py diff --git a/telegram/successfulpayment.py b/telegram/payment/successfulpayment.py similarity index 100% rename from telegram/successfulpayment.py rename to telegram/payment/successfulpayment.py