| \n | def send_dice( | \n
| \n | self, | \n
| \n | chat_id: Union[int, str], | \n
| \n | disable_notification: ODVInput[bool] = DEFAULT_NONE, | \n
| \n | reply_to_message_id: int = None, | \n
| \n | reply_markup: ReplyMarkup = None, | \n
| \n | timeout: ODVInput[float] = DEFAULT_NONE, | \n
| \n | emoji: str = None, | \n
| \n | api_kwargs: JSONDict = None, | \n
| \n | allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE, | \n
| \n | protect_content: bool = None, | \n
| \n | ) -> Message: | \n
I also tried telegram.Dice class as it accepts emoji and value but using it with send_dice method throws exception that Dice cannot be serialized.
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"You can't. The bot API doesn't support that. The closest you can get is forwarding a message that contains a die with the desired value.
","upvoteCount":1,"url":"https://github.com/python-telegram-bot/python-telegram-bot/discussions/3635#discussioncomment-5448438"}}}-
|
As I want to specify exact value for a dice how should I do this? python-telegram-bot/telegram/bot.py Lines 5315 to 5326 in 92cb6f3 I also tried telegram.Dice class as it accepts emoji and value but using it with send_dice method throws exception that Dice cannot be serialized. |
Beta Was this translation helpful? Give feedback.
-
|
You can't. The bot API doesn't support that. The closest you can get is forwarding a message that contains a die with the desired value. |
Beta Was this translation helpful? Give feedback.
You can't. The bot API doesn't support that. The closest you can get is forwarding a message that contains a die with the desired value.