mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
add struct and set fields type to 'pub'
This commit is contained in:
parent
1852b8f5a1
commit
dcdc776c50
3 changed files with 18 additions and 5 deletions
|
@ -1,2 +1,2 @@
|
||||||
/// A placeholder, currently holds no information. Use [BotFather](https://t.me/botfather) to set up your game.
|
/// A placeholder, currently holds no information. Use [BotFather](https://t.me/botfather) to set up your game.
|
||||||
struct CallbackGame;
|
pub struct CallbackGame;
|
13
src/core/types/game.rs
Normal file
13
src/core/types/game.rs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
use serde::Deserialize;
|
||||||
|
|
||||||
|
use crate::core::types::MessageEntity;
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
pub struct Game {
|
||||||
|
pub title: String,
|
||||||
|
pub description: String,
|
||||||
|
pub photo: Vec<PhotoSize>,
|
||||||
|
pub text: Option<String>,
|
||||||
|
pub text_entities: Option<Vec<MessageEntity>>,
|
||||||
|
pub animation: Option<Animation>,
|
||||||
|
}
|
|
@ -3,8 +3,8 @@ use serde::Deserialize;
|
||||||
use crate::core::types::user::User;
|
use crate::core::types::user::User;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
struct GameHighScore {
|
pub struct GameHighScore {
|
||||||
position: i32,
|
pub position: i32,
|
||||||
user: User,
|
pub user: User,
|
||||||
score: i32,
|
pub score: i32,
|
||||||
}
|
}
|
Loading…
Reference in a new issue