mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-31 16:40:37 +01:00
Add the 'dice' field to Message
This commit is contained in:
parent
5afbef5734
commit
a4cc59a3e0
1 changed files with 10 additions and 2 deletions
|
@ -4,8 +4,8 @@ use serde::{Deserialize, Serialize};
|
|||
|
||||
use crate::types::{
|
||||
chat::{ChatKind, PublicChatKind},
|
||||
Animation, Audio, Chat, ChatPublic, Contact, Document, Game, InlineKeyboardMarkup, Invoice,
|
||||
Location, MessageEntity, PassportData, PhotoSize, Poll, PublicChatChannel,
|
||||
Animation, Audio, Chat, ChatPublic, Contact, Dice, Document, Game, InlineKeyboardMarkup,
|
||||
Invoice, Location, MessageEntity, PassportData, PhotoSize, Poll, PublicChatChannel,
|
||||
PublicChatSupergroup, Sticker, SuccessfulPayment, True, User, Venue, Video, VideoNote, Voice,
|
||||
};
|
||||
|
||||
|
@ -74,6 +74,7 @@ pub enum MessageKind {
|
|||
SuccessfulPayment(MessageSuccessfulPayment),
|
||||
ConnectedWebsite(MessageConnectedWebsite),
|
||||
PassportData(MessagePassportData),
|
||||
Dice(MessageDice),
|
||||
}
|
||||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
|
@ -1048,6 +1049,13 @@ impl MediaVenue {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageDice {
|
||||
/// Message is a dice with random value from 1 to 6.
|
||||
dice: Dice,
|
||||
}
|
||||
|
||||
mod getters {
|
||||
use std::ops::Deref;
|
||||
|
||||
|
|
Loading…
Reference in a new issue