mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 02:03:04 +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,
|
SendMessage,
|
||||||
SendPhoto,
|
SendPhoto,
|
||||||
SendPoll,
|
SendPoll,
|
||||||
|
SendDice,
|
||||||
SendSticker,
|
SendSticker,
|
||||||
SendVenue,
|
SendVenue,
|
||||||
SendVideo,
|
SendVideo,
|
||||||
|
|
@ -1084,6 +1085,52 @@ class Message(TelegramObject):
|
||||||
reply_markup=reply_markup,
|
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(
|
def reply_sticker(
|
||||||
self,
|
self,
|
||||||
sticker: Union[InputFile, str],
|
sticker: Union[InputFile, str],
|
||||||
|
|
|
||||||
|
|
@ -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_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_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_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 |
|
| `reply_invoice` | `answer_invoice` | [Bot.send_invoice](../methods/send_invoice.md) | Reply or Answer with invoice |
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue