2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 21:07:59 +00:00

Add more Message convenience methods (#233)

* Added convenience methods
message.reply_animation
message.reply_audio
message.reply_cached_media
message.reply_chat_action
message.reply_contact
message.reply_document
message.reply_game
message.reply_inline_bot_result
message.reply_location
message.reply_media_group
message.reply_photo
message.reply_poll
message.reply_sticker
message.reply_venue
message.reply_video
message.reply_video_note
message.reply_voice
message.edit_caption
message.edit_media
message.edit_reply_markup
message.pin

fixed send_document docstrings while doing so
uniformed function declaration of send_poll

* Update style and small fixes
This commit is contained in:
Eric Solinas 2019-03-20 15:44:20 +01:00 committed by Dan
parent 5aa93b8287
commit ac591cf3c7
3 changed files with 1854 additions and 31 deletions

View File

@ -60,7 +60,7 @@ class SendDocument(BaseClient):
pass an HTTP URL as a string for Telegram to get a file from the Internet, or pass an HTTP URL as a string for Telegram to get a file from the Internet, or
pass a file path as string to upload a new file that exists on your local machine. pass a file path as string to upload a new file that exists on your local machine.
thumb (``str``): thumb (``str``, *optional*):
Thumbnail of the file sent. Thumbnail of the file sent.
The thumbnail should be in JPEG format and less than 200 KB in size. The thumbnail should be in JPEG format and less than 200 KB in size.
A thumbnail's width and height should not exceed 90 pixels. A thumbnail's width and height should not exceed 90 pixels.

View File

@ -24,20 +24,20 @@ from pyrogram.client.ext import BaseClient
class SendPoll(BaseClient): class SendPoll(BaseClient):
def send_poll \ def send_poll(
(self, self,
chat_id: Union[int, str], chat_id: Union[int, str],
question: str, question: str,
options: List[str], options: List[str],
disable_notification: bool = None, disable_notification: bool = None,
reply_to_message_id: int = None, reply_to_message_id: int = None,
reply_markup: Union[ reply_markup: Union[
"pyrogram.InlineKeyboardMarkup", "pyrogram.InlineKeyboardMarkup",
"pyrogram.ReplyKeyboardMarkup", "pyrogram.ReplyKeyboardMarkup",
"pyrogram.ReplyKeyboardRemove", "pyrogram.ReplyKeyboardRemove",
"pyrogram.ForceReply" "pyrogram.ForceReply"
] = None ] = None
) -> "pyrogram.Message": ) -> "pyrogram.Message":
"""Use this method to send a new poll. """Use this method to send a new poll.
Args: Args:

File diff suppressed because it is too large Load Diff