mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Included chat_member.rs in mod.rs, fixed bug, added Audio
This commit is contained in:
parent
8511aeb609
commit
b1a8e9ba9b
5 changed files with 29 additions and 6 deletions
13
src/core/types/audio.rs
Normal file
13
src/core/types/audio.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
use crate::core::types::PhotoSize;
|
||||
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Hash, PartialEq, Eq)]
|
||||
pub struct Audio {
|
||||
pub file_id: String,
|
||||
pub duration: u32,
|
||||
pub performer: Option<String>,
|
||||
pub title: Option<String>,
|
||||
pub mime_type: Option<String>,
|
||||
pub file_size: Option<u32>,
|
||||
pub thumb: Option<PhotoSize>
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
use serde::Deserialize;
|
||||
use crate::core::types::{
|
||||
User, ChatMemberStatus, Integer
|
||||
};
|
||||
|
||||
/// This object contains information about one member of the chat.
|
||||
#[derive(Debug, Deserialize, Hash, PartialEq, Eq)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::core::types::PhotoSize;
|
||||
use crate::core::types::{PhotoSize, UnsignedInteger};
|
||||
|
||||
#[derive(Debug, Deserialize, Hash, PartialEq, Eq)]
|
||||
pub struct Document {
|
||||
|
@ -6,5 +6,5 @@ pub struct Document {
|
|||
pub thumb: Option<PhotoSize>,
|
||||
pub file_name: Option<String>,
|
||||
pub mime_type: Option<String>,
|
||||
pub file_size: Option<i64>,
|
||||
pub file_size: Option<UnsignedInteger>,
|
||||
}
|
||||
|
|
|
@ -2,12 +2,18 @@ mod not_implemented_types;
|
|||
use self::not_implemented_types::*;
|
||||
|
||||
|
||||
pub type Integer = i32;
|
||||
pub type UnsignedInteger = u32;
|
||||
|
||||
|
||||
pub use self::{
|
||||
answer_pre_checkout_query::AnswerPreCheckoutQuery,
|
||||
answer_shipping_query::AnswerShippingQuery,
|
||||
audio::Audio,
|
||||
chat::Chat,
|
||||
chat_permissions::ChatPermissions,
|
||||
chat_photo::ChatPhoto,
|
||||
chat_member::ChatMember,
|
||||
document::Document,
|
||||
invoice::Invoice,
|
||||
label_price::LabeledPrice,
|
||||
|
@ -26,9 +32,11 @@ pub use self::{
|
|||
|
||||
mod answer_pre_checkout_query;
|
||||
mod answer_shipping_query;
|
||||
mod audio;
|
||||
mod chat;
|
||||
mod chat_permissions;
|
||||
mod chat_photo;
|
||||
mod chat_member;
|
||||
mod document;
|
||||
mod invoice;
|
||||
mod label_price;
|
||||
|
|
|
@ -16,9 +16,6 @@ pub struct Poll;
|
|||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
||||
pub struct Animation;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
||||
pub struct Audio;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
||||
pub struct Game;
|
||||
|
||||
|
@ -39,3 +36,6 @@ pub struct Voice;
|
|||
|
||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
||||
pub struct MaskPosition;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Hash, Eq)]
|
||||
pub struct ChatMemberStatus;
|
||||
|
|
Loading…
Reference in a new issue