diff --git a/aiogram/api/types/message.py b/aiogram/api/types/message.py index f4b9e655..19d2b036 100644 --- a/aiogram/api/types/message.py +++ b/aiogram/api/types/message.py @@ -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], diff --git a/docs/api/types/message.md b/docs/api/types/message.md index c265d656..6e7b088d 100644 --- a/docs/api/types/message.md +++ b/docs/api/types/message.md @@ -92,6 +92,7 @@ This methods has the same specification with the API but without `chat_id` and ` | `reply_video_note` | `answer_video_note` | [Bot.send_video_note](../methods/send_video_note.md) | Reply or Answer with video_note | | `reply_venue` | `answer_venue` | [Bot.send_venue](../methods/send_venue.md) | Reply or Answer with venue | | `reply_poll` | `answer_poll` | [Bot.send_poll](../methods/send_poll.md) | Reply or Answer with poll | +| `reply_dice` | `answer_dice` | [Bot.send_dice](../methods/send_dice.md) | Reply or Answer with dice | | `reply_invoice` | `answer_invoice` | [Bot.send_invoice](../methods/send_invoice.md) | Reply or Answer with invoice |