Make methods directory structure simple
This commit is contained in:
parent
6c976a3708
commit
8074ef1368
@ -16,12 +16,16 @@
|
|||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from .callback_query import CallbackQuery
|
from .answer_callback_query import AnswerCallbackQuery
|
||||||
from .inline import Inline
|
from .get_inline_bot_results import GetInlineBotResults
|
||||||
|
from .request_callback_answer import RequestCallbackAnswer
|
||||||
|
from .send_inline_bot_result import SendInlineBotResult
|
||||||
|
|
||||||
|
|
||||||
class Bots(
|
class Bots(
|
||||||
CallbackQuery,
|
AnswerCallbackQuery,
|
||||||
Inline
|
GetInlineBotResults,
|
||||||
|
RequestCallbackAnswer,
|
||||||
|
SendInlineBotResult
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pyrogram.api import functions
|
from pyrogram.api import functions
|
||||||
from ....ext import BaseClient
|
from pyrogram.client.ext import BaseClient
|
||||||
|
|
||||||
|
|
||||||
class AnswerCallbackQuery(BaseClient):
|
class AnswerCallbackQuery(BaseClient):
|
@ -1,25 +0,0 @@
|
|||||||
# Pyrogram - Telegram MTProto API Client Library for Python
|
|
||||||
# Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>
|
|
||||||
#
|
|
||||||
# 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
from .answer_callback_query import AnswerCallbackQuery
|
|
||||||
|
|
||||||
|
|
||||||
class CallbackQuery(
|
|
||||||
AnswerCallbackQuery
|
|
||||||
):
|
|
||||||
pass
|
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from pyrogram.api.errors import UnknownError
|
from pyrogram.api.errors import UnknownError
|
||||||
from ....ext import BaseClient
|
from pyrogram.client.ext import BaseClient
|
||||||
|
|
||||||
|
|
||||||
class GetInlineBotResults(BaseClient):
|
class GetInlineBotResults(BaseClient):
|
@ -1,27 +0,0 @@
|
|||||||
# Pyrogram - Telegram MTProto API Client Library for Python
|
|
||||||
# Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>
|
|
||||||
#
|
|
||||||
# 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
from .get_inline_bot_results import GetInlineBotResults
|
|
||||||
from .send_inline_bot_result import SendInlineBotResult
|
|
||||||
|
|
||||||
|
|
||||||
class Inline(
|
|
||||||
SendInlineBotResult,
|
|
||||||
GetInlineBotResults
|
|
||||||
):
|
|
||||||
pass
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pyrogram.api import functions
|
from pyrogram.api import functions
|
||||||
from ....ext import BaseClient
|
from pyrogram.client.ext import BaseClient
|
||||||
|
|
||||||
|
|
||||||
class SendInlineBotResult(BaseClient):
|
class SendInlineBotResult(BaseClient):
|
@ -16,22 +16,50 @@
|
|||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from .action import Action
|
from .delete_messages import DeleteMessages
|
||||||
|
from .edit_message_caption import EditMessageCaption
|
||||||
|
from .edit_message_reply_markup import EditMessageReplyMarkup
|
||||||
|
from .edit_message_text import EditMessageText
|
||||||
from .forward_messages import ForwardMessages
|
from .forward_messages import ForwardMessages
|
||||||
from .get_history import GetHistory
|
from .get_history import GetHistory
|
||||||
from .get_messages import GetMessages
|
from .get_messages import GetMessages
|
||||||
from .media import Media
|
from .send_audio import SendAudio
|
||||||
|
from .send_chat_action import SendChatAction
|
||||||
|
from .send_contact import SendContact
|
||||||
|
from .send_document import SendDocument
|
||||||
|
from .send_gif import SendGIF
|
||||||
|
from .send_location import SendLocation
|
||||||
|
from .send_media_group import SendMediaGroup
|
||||||
from .send_message import SendMessage
|
from .send_message import SendMessage
|
||||||
from .update import Update
|
from .send_photo import SendPhoto
|
||||||
|
from .send_sticker import SendSticker
|
||||||
|
from .send_venue import SendVenue
|
||||||
|
from .send_video import SendVideo
|
||||||
|
from .send_video_note import SendVideoNote
|
||||||
|
from .send_voice import SendVoice
|
||||||
|
|
||||||
|
|
||||||
class Messages(
|
class Messages(
|
||||||
|
DeleteMessages,
|
||||||
|
EditMessageCaption,
|
||||||
|
EditMessageReplyMarkup,
|
||||||
|
EditMessageText,
|
||||||
|
ForwardMessages,
|
||||||
GetHistory,
|
GetHistory,
|
||||||
GetMessages,
|
GetMessages,
|
||||||
Action,
|
SendAudio,
|
||||||
Media,
|
SendChatAction,
|
||||||
Update,
|
SendContact,
|
||||||
ForwardMessages,
|
SendDocument,
|
||||||
SendMessage
|
SendGIF,
|
||||||
|
SendLocation,
|
||||||
|
SendMediaGroup,
|
||||||
|
SendMessage,
|
||||||
|
SendPhoto,
|
||||||
|
SendSticker,
|
||||||
|
SendVenue,
|
||||||
|
SendVideo,
|
||||||
|
SendVideoNote,
|
||||||
|
SendVoice
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
# Pyrogram - Telegram MTProto API Client Library for Python
|
|
||||||
# Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>
|
|
||||||
#
|
|
||||||
# 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
from .send_chat_action import SendChatAction
|
|
||||||
|
|
||||||
|
|
||||||
class Action(
|
|
||||||
SendChatAction
|
|
||||||
):
|
|
||||||
pass
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from ....ext import BaseClient
|
from pyrogram.client.ext import BaseClient
|
||||||
|
|
||||||
|
|
||||||
class DeleteMessages(BaseClient):
|
class DeleteMessages(BaseClient):
|
@ -17,7 +17,7 @@
|
|||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class EditMessageCaption(BaseClient):
|
class EditMessageCaption(BaseClient):
|
@ -17,7 +17,7 @@
|
|||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class EditMessageReplyMarkup(BaseClient):
|
class EditMessageReplyMarkup(BaseClient):
|
@ -17,7 +17,7 @@
|
|||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class EditMessageText(BaseClient):
|
class EditMessageText(BaseClient):
|
@ -1,47 +0,0 @@
|
|||||||
# Pyrogram - Telegram MTProto API Client Library for Python
|
|
||||||
# Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>
|
|
||||||
#
|
|
||||||
# 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
from .send_audio import SendAudio
|
|
||||||
from .send_contact import SendContact
|
|
||||||
from .send_document import SendDocument
|
|
||||||
from .send_gif import SendGIF
|
|
||||||
from .send_location import SendLocation
|
|
||||||
from .send_media_group import SendMediaGroup
|
|
||||||
from .send_photo import SendPhoto
|
|
||||||
from .send_sticker import SendSticker
|
|
||||||
from .send_venue import SendVenue
|
|
||||||
from .send_video import SendVideo
|
|
||||||
from .send_video_note import SendVideoNote
|
|
||||||
from .send_voice import SendVoice
|
|
||||||
|
|
||||||
|
|
||||||
class Media(
|
|
||||||
SendContact,
|
|
||||||
SendVenue,
|
|
||||||
SendLocation,
|
|
||||||
SendMediaGroup,
|
|
||||||
SendVideoNote,
|
|
||||||
SendVoice,
|
|
||||||
SendVideo,
|
|
||||||
SendGIF,
|
|
||||||
SendSticker,
|
|
||||||
SendDocument,
|
|
||||||
SendAudio,
|
|
||||||
SendPhoto
|
|
||||||
):
|
|
||||||
pass
|
|
@ -23,7 +23,7 @@ import struct
|
|||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendAudio(BaseClient):
|
class SendAudio(BaseClient):
|
@ -17,7 +17,7 @@
|
|||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pyrogram.api import functions
|
from pyrogram.api import functions
|
||||||
from ....ext import BaseClient, ChatAction
|
from pyrogram.client.ext import BaseClient, ChatAction
|
||||||
|
|
||||||
|
|
||||||
class SendChatAction(BaseClient):
|
class SendChatAction(BaseClient):
|
@ -17,7 +17,7 @@
|
|||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendContact(BaseClient):
|
class SendContact(BaseClient):
|
@ -23,7 +23,7 @@ import struct
|
|||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendDocument(BaseClient):
|
class SendDocument(BaseClient):
|
@ -23,7 +23,7 @@ import struct
|
|||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendGIF(BaseClient):
|
class SendGIF(BaseClient):
|
@ -17,7 +17,7 @@
|
|||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendLocation(BaseClient):
|
class SendLocation(BaseClient):
|
@ -24,7 +24,7 @@ import struct
|
|||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from pyrogram.api.errors import FileIdInvalid
|
from pyrogram.api.errors import FileIdInvalid
|
||||||
from pyrogram.client import types as pyrogram_types
|
from pyrogram.client import types as pyrogram_types
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendMediaGroup(BaseClient):
|
class SendMediaGroup(BaseClient):
|
@ -22,7 +22,7 @@ import struct
|
|||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendPhoto(BaseClient):
|
class SendPhoto(BaseClient):
|
@ -22,7 +22,7 @@ import struct
|
|||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendSticker(BaseClient):
|
class SendSticker(BaseClient):
|
@ -17,7 +17,7 @@
|
|||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendVenue(BaseClient):
|
class SendVenue(BaseClient):
|
@ -23,7 +23,7 @@ import struct
|
|||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendVideo(BaseClient):
|
class SendVideo(BaseClient):
|
@ -23,7 +23,7 @@ import struct
|
|||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendVideoNote(BaseClient):
|
class SendVideoNote(BaseClient):
|
@ -23,7 +23,7 @@ import struct
|
|||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
from pyrogram.api.errors import FileIdInvalid, FilePartMissing
|
||||||
from ....ext import BaseClient, utils
|
from pyrogram.client.ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class SendVoice(BaseClient):
|
class SendVoice(BaseClient):
|
@ -1,31 +0,0 @@
|
|||||||
# Pyrogram - Telegram MTProto API Client Library for Python
|
|
||||||
# Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>
|
|
||||||
#
|
|
||||||
# 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
from .delete_messages import DeleteMessages
|
|
||||||
from .edit_message_caption import EditMessageCaption
|
|
||||||
from .edit_message_reply_markup import EditMessageReplyMarkup
|
|
||||||
from .edit_message_text import EditMessageText
|
|
||||||
|
|
||||||
|
|
||||||
class Update(
|
|
||||||
DeleteMessages,
|
|
||||||
EditMessageReplyMarkup,
|
|
||||||
EditMessageCaption,
|
|
||||||
EditMessageText
|
|
||||||
):
|
|
||||||
pass
|
|
Loading…
Reference in New Issue
Block a user