2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +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 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.
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.

View File

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

File diff suppressed because it is too large Load Diff