mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add message reply&answer methods for dice
This commit is contained in:
parent
82f89b9c1d
commit
e4cd4c1763
2 changed files with 48 additions and 0 deletions
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue