mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Add GiveawayCreated
struct
This commit is contained in:
parent
62da0027e3
commit
fa1b793c7f
3 changed files with 27 additions and 6 deletions
|
@ -42,6 +42,7 @@ pub use game_high_score::*;
|
||||||
pub use general_forum_topic_hidden::*;
|
pub use general_forum_topic_hidden::*;
|
||||||
pub use general_forum_topic_unhidden::*;
|
pub use general_forum_topic_unhidden::*;
|
||||||
pub use giveaway::*;
|
pub use giveaway::*;
|
||||||
|
pub use giveaway_created::*;
|
||||||
pub use inaccessible_message::*;
|
pub use inaccessible_message::*;
|
||||||
pub use inline_keyboard_button::*;
|
pub use inline_keyboard_button::*;
|
||||||
pub use inline_keyboard_markup::*;
|
pub use inline_keyboard_markup::*;
|
||||||
|
@ -176,6 +177,7 @@ mod game_high_score;
|
||||||
mod general_forum_topic_hidden;
|
mod general_forum_topic_hidden;
|
||||||
mod general_forum_topic_unhidden;
|
mod general_forum_topic_unhidden;
|
||||||
mod giveaway;
|
mod giveaway;
|
||||||
|
mod giveaway_created;
|
||||||
mod inaccessible_message;
|
mod inaccessible_message;
|
||||||
mod inline_keyboard_button;
|
mod inline_keyboard_button;
|
||||||
mod inline_keyboard_markup;
|
mod inline_keyboard_markup;
|
||||||
|
|
7
crates/teloxide-core/src/types/giveaway_created.rs
Normal file
7
crates/teloxide-core/src/types/giveaway_created.rs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
/// This object represents a service message about the creation of a scheduled
|
||||||
|
/// giveaway. Currently holds no information.
|
||||||
|
#[serde_with::skip_serializing_none]
|
||||||
|
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct GiveawayCreated {}
|
|
@ -7,12 +7,13 @@ use url::Url;
|
||||||
use crate::types::{
|
use crate::types::{
|
||||||
Animation, Audio, BareChatId, Chat, ChatId, ChatShared, Contact, Dice, Document,
|
Animation, Audio, BareChatId, Chat, ChatId, ChatShared, Contact, Dice, Document,
|
||||||
ForumTopicClosed, ForumTopicCreated, ForumTopicEdited, ForumTopicReopened, Game,
|
ForumTopicClosed, ForumTopicCreated, ForumTopicEdited, ForumTopicReopened, Game,
|
||||||
GeneralForumTopicHidden, GeneralForumTopicUnhidden, Giveaway, InlineKeyboardMarkup, Invoice,
|
GeneralForumTopicHidden, GeneralForumTopicUnhidden, Giveaway, GiveawayCreated,
|
||||||
Location, MaybeInaccessibleMessage, MessageAutoDeleteTimerChanged, MessageEntity,
|
InlineKeyboardMarkup, Invoice, Location, MaybeInaccessibleMessage,
|
||||||
MessageEntityRef, MessageId, MessageOrigin, PassportData, PhotoSize, Poll,
|
MessageAutoDeleteTimerChanged, MessageEntity, MessageEntityRef, MessageId, MessageOrigin,
|
||||||
ProximityAlertTriggered, Sticker, Story, SuccessfulPayment, TextQuote, ThreadId, True, User,
|
PassportData, PhotoSize, Poll, ProximityAlertTriggered, Sticker, Story, SuccessfulPayment,
|
||||||
UsersShared, Venue, Video, VideoChatEnded, VideoChatParticipantsInvited, VideoChatScheduled,
|
TextQuote, ThreadId, True, User, UsersShared, Venue, Video, VideoChatEnded,
|
||||||
VideoChatStarted, VideoNote, Voice, WebAppData, WriteAccessAllowed,
|
VideoChatParticipantsInvited, VideoChatScheduled, VideoChatStarted, VideoNote, Voice,
|
||||||
|
WebAppData, WriteAccessAllowed,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// This object represents a message.
|
/// This object represents a message.
|
||||||
|
@ -77,6 +78,7 @@ pub enum MessageKind {
|
||||||
GeneralForumTopicHidden(MessageGeneralForumTopicHidden),
|
GeneralForumTopicHidden(MessageGeneralForumTopicHidden),
|
||||||
GeneralForumTopicUnhidden(MessageGeneralForumTopicUnhidden),
|
GeneralForumTopicUnhidden(MessageGeneralForumTopicUnhidden),
|
||||||
Giveaway(MessageGiveaway),
|
Giveaway(MessageGiveaway),
|
||||||
|
GiveawayCreated(MessageGiveawayCreated),
|
||||||
VideoChatScheduled(MessageVideoChatScheduled),
|
VideoChatScheduled(MessageVideoChatScheduled),
|
||||||
VideoChatStarted(MessageVideoChatStarted),
|
VideoChatStarted(MessageVideoChatStarted),
|
||||||
VideoChatEnded(MessageVideoChatEnded),
|
VideoChatEnded(MessageVideoChatEnded),
|
||||||
|
@ -603,6 +605,16 @@ pub struct MessageGiveaway {
|
||||||
pub giveaway: Giveaway,
|
pub giveaway: Giveaway,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[serde_with::skip_serializing_none]
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct MessageGiveawayCreated {
|
||||||
|
/// Service message: a scheduled 'Giveaway' created. [More about giveaways
|
||||||
|
/// »]
|
||||||
|
///
|
||||||
|
/// [More about giveaways »]: https://core.telegram.org/api#giveaways-amp-gifts
|
||||||
|
pub giveaway_created: GiveawayCreated,
|
||||||
|
}
|
||||||
|
|
||||||
#[serde_with::skip_serializing_none]
|
#[serde_with::skip_serializing_none]
|
||||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct MessageVideoChatScheduled {
|
pub struct MessageVideoChatScheduled {
|
||||||
|
|
Loading…
Reference in a new issue