Add message reply&answer methods for dice

This commit is contained in:
Alex Root Junior 2020-04-11 23:06:41 +03:00
parent 82f89b9c1d
commit e4cd4c1763
2 changed files with 48 additions and 0 deletions

View file

@ -50,6 +50,7 @@ if TYPE_CHECKING: # pragma: no cover
SendMessage,
SendPhoto,
SendPoll,
SendDice,
SendSticker,
SendVenue,
SendVideo,
@ -1084,6 +1085,52 @@ class Message(TelegramObject):
reply_markup=reply_markup,
)
def reply_dice(
self,
disable_notification: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
) -> SendDice:
"""
Reply with dice
:param disable_notification:
:param reply_markup:
:return:
"""
from ..methods import SendDice
return SendDice(
chat_id=self.chat.id,
disable_notification=disable_notification,
reply_to_message_id=self.message_id,
reply_markup=reply_markup,
)
def answer_dice(
self,
disable_notification: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
) -> SendDice:
"""
Answer with dice
:param disable_notification:
:param reply_markup:
:return:
"""
from ..methods import SendDice
return SendDice(
chat_id=self.chat.id,
disable_notification=disable_notification,
reply_to_message_id=None,
reply_markup=reply_markup,
)
def reply_sticker(
self,
sticker: Union[InputFile, str],