diff --git a/pyrogram/client/__init__.py b/pyrogram/client/__init__.py index d43511d2..584449c7 100644 --- a/pyrogram/client/__init__.py +++ b/pyrogram/client/__init__.py @@ -17,9 +17,9 @@ # along with Pyrogram. If not, see . from .client import Client -from .ext import BaseClient, ChatAction, Emoji, ParseMode +from .ext import BaseClient, ChatAction, Emoji from .filters import Filters __all__ = [ - "Client", "BaseClient", "ChatAction", "Emoji", "ParseMode", "Filters", + "Client", "BaseClient", "ChatAction", "Emoji", "Filters", ] diff --git a/pyrogram/client/ext/__init__.py b/pyrogram/client/ext/__init__.py index 18c28ac3..a8e7c794 100644 --- a/pyrogram/client/ext/__init__.py +++ b/pyrogram/client/ext/__init__.py @@ -20,5 +20,4 @@ from .base_client import BaseClient from .chat_action import ChatAction from .dispatcher import Dispatcher from .emoji import Emoji -from .parse_mode import ParseMode from .syncer import Syncer diff --git a/pyrogram/client/ext/parse_mode.py b/pyrogram/client/ext/parse_mode.py deleted file mode 100644 index 46ed97e3..00000000 --- a/pyrogram/client/ext/parse_mode.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 ParseMode: - """This class provides a convenient access to Parse Modes. - Parse Modes are intended to be used with any method that accepts the optional argument **parse_mode**. - """ - - HTML = "html" - """Set the parse mode to HTML style""" - - MARKDOWN = "markdown" - """Set the parse mode to Markdown style""" diff --git a/pyrogram/client/types/messages_and_media/message.py b/pyrogram/client/types/messages_and_media/message.py index 46f6187a..648177d4 100644 --- a/pyrogram/client/types/messages_and_media/message.py +++ b/pyrogram/client/types/messages_and_media/message.py @@ -22,7 +22,7 @@ from typing import List, Match, Union import pyrogram from pyrogram.api import types from pyrogram.errors import MessageIdsEmpty -from pyrogram.client.ext import ChatAction, ParseMode +from pyrogram.client.ext import ChatAction from pyrogram.client.types.input_media import InputMedia from .contact import Contact from .location import Location @@ -2686,7 +2686,7 @@ class Message(PyrogramType, Update): if self.sticker or self.video_note: # Sticker and VideoNote should have no caption return send_media(file_id=file_id) else: - return send_media(file_id=file_id, caption=caption, parse_mode=ParseMode.HTML) + return send_media(file_id=file_id, caption=caption, parse_mode="html") else: raise ValueError("Can't copy this message") else: