Add the 'dice' field to Message

This commit is contained in:
Temirkhan Myrzamadi 2020-07-29 03:41:57 +06:00
parent 5afbef5734
commit a4cc59a3e0

View file

@ -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;