[][src]Struct tbot::contexts::Game

pub struct Game<C> {
    pub bot: Arc<Bot<C>>,
    pub message_id: Id,
    pub from: Option<User>,
    pub date: i64,
    pub chat: Chat,
    pub reply_to: Option<Message>,
    pub author_signature: Option<String>,
    pub forward: Option<Forward>,
    pub reply_markup: Option<Keyboard>,
    pub game: Game,
}

The context for game handlers.

Fields

bot: Arc<Bot<C>>

A bot for calling API without information inference.

message_id: Id

ID of the message.

from: Option<User>

The author of the message.

date: i64

The timestamp of the message.

chat: Chat

The chat to which the message was sent.

reply_to: Option<Message>

The replied message.

author_signature: Option<String>

The author's signature, if enabled for the channel.

forward: Option<Forward>

The origin of the message if it's a forward.

reply_markup: Option<Keyboard>

The inline keyboard attached to the message.

game: Game

The game.

Trait Implementations

impl<'a, C: 'static> ChatMethods<'a, C> for Game<C>[src]

fn delete_chat_photo(&'a self) -> DeleteChatPhoto<'a, C>[src]

Deletes the photo of this chat.

fn delete_chat_sticker_set(&'a self) -> DeleteChatStickerSet<'a, C>[src]

Deletes the sticker set of this chat.

fn delete_message(&'a self, message_id: Id) -> DeleteMessage<'a, C>[src]

Deletes a message in this chat.

fn delete_this_message(&'a self) -> DeleteMessage<'a, C>[src]

Deletes the incoming message.

fn edit_message_caption(
    &'a self,
    message_id: Id,
    caption: impl Into<Text<'a>>
) -> EditMessageCaption<'a, C>
[src]

Updates the caption of a message in this group.

fn edit_message_location(
    &'a self,
    message_id: Id,
    location: (f64, f64)
) -> EditMessageLocation<'a, C>
[src]

Updates a live location in this group.

fn edit_message_media(
    &'a self,
    message_id: Id,
    media: impl Into<EditableMedia<'a>>
) -> EditMessageMedia<'a, C>
[src]

Updates the media of a message in this group.

fn edit_message_reply_markup(
    &'a self,
    message_id: Id,
    reply_markup: Keyboard<'a>
) -> EditMessageReplyMarkup<'a, C>
[src]

Updates the reply markup of a message in this group.

fn edit_message_text(
    &'a self,
    message_id: Id,
    text: impl Into<Text<'a>>
) -> EditMessageText<'a, C>
[src]

Updates the text of a message in this group.

Exports the invite link of this chat.

fn forward_here(
    &'a self,
    from_chat_id: impl ImplicitChatId<'a>,
    message_id: Id
) -> ForwardMessage<'a, C>
[src]

Forwards a message to this chat.

fn get_chat(&'a self) -> GetChat<'a, C>[src]

Gets information about this chat.

fn get_chat_administrators(&'a self) -> GetChatAdministrators<'a, C>[src]

Gets a list of admins of this chat.

fn get_chat_member(&'a self, user_id: Id) -> GetChatMember<'a, C>[src]

Gets information about a member of this chat.

fn get_chat_members_count(&'a self) -> GetChatMembersCount<'a, C>[src]

Gets the number of members in this chat.

fn get_message_game_high_scores(
    &'a self,
    message_id: Id,
    user_id: Id
) -> GetMessageGameHighScores<'a, C>
[src]

Gets infomation about high scores in a game sent in this chat.

fn kick_chat_member(&'a self, user_id: Id) -> KickChatMember<'a, C>[src]

Kicks a member of this chat.

fn leave_chat(&'a self) -> LeaveChat<'a, C>[src]

Leaves this chat.

fn promote_chat_member(&'a self, user_id: Id) -> PromoteChatMember<'a, C>[src]

Promotes a member of this chat.

fn restrict_chat_member(&'a self, user_id: Id) -> RestrictChatMember<'a, C>[src]

Restricts a member of this chat.

fn send_animation(&'a self, animation: Animation<'a>) -> SendAnimation<'a, C>[src]

Send an animation to this chat.

fn send_animation_in_reply(
    &'a self,
    animation: Animation<'a>
) -> SendAnimation<'a, C>
[src]

Sends an animation in reply to this message.

fn send_audio(&'a self, audio: Audio<'a>) -> SendAudio<'a, C>[src]

Sends an audio to this chat.

fn send_audio_in_reply(&'a self, audio: Audio<'a>) -> SendAudio<'a, C>[src]

Sends an audio in reply to this message.

fn send_chat_action(&'a self, action: Action) -> SendChatAction<C>[src]

Sends an action to this group.

fn send_contact(
    &'a self,
    phone_number: &'a str,
    first_name: &'a str
) -> SendContact<'a, C>
[src]

Sends a contact to this group.

fn send_contact_in_reply(
    &'a self,
    phone_number: &'a str,
    first_name: &'a str
) -> SendContact<'a, C>
[src]

Sends a contact in reply to this message.

fn send_game(&'a self, game_short_name: &'a str) -> SendGame<'a, C>[src]

Sends a game to this chat.

fn send_game_in_reply(&'a self, game_short_name: &'a str) -> SendGame<'a, C>[src]

Sends a game in reply to this message.

fn send_document(&'a self, document: Document<'a>) -> SendDocument<'a, C>[src]

Sends a document to this chat.

fn send_document_in_reply(
    &'a self,
    document: Document<'a>
) -> SendDocument<'a, C>
[src]

Sends a document in reply to this message.

fn send_invoice(
    &'a self,
    title: &'a str,
    description: &'a str,
    payload: &'a str,
    provider_token: &'a str,
    start_parameter: &'a str,
    currency: &'a str,
    prices: &'a [LabeledPrice<'a>]
) -> SendInvoice<'a, C>
[src]

Sends an invoice to this chat.

fn send_invoice_in_reply(
    &'a self,
    title: &'a str,
    description: &'a str,
    payload: &'a str,
    provider_token: &'a str,
    start_parameter: &'a str,
    currency: &'a str,
    prices: &'a [LabeledPrice<'a>]
) -> SendInvoice<'a, C>
[src]

Sends an invoice in reply to this message.

fn send_location(&'a self, location: (f64, f64)) -> SendLocation<C>[src]

Sends a location to this chat.

fn send_location_in_reply(&'a self, location: (f64, f64)) -> SendLocation<C>[src]

Sends a location in reply to this message.

fn send_media_group(
    &'a self,
    media: &'a [GroupMedia<'a>]
) -> SendMediaGroup<'a, C>
[src]

Sends an album to this chat.

fn send_media_group_in_reply(
    &'a self,
    media: &'a [GroupMedia<'a>]
) -> SendMediaGroup<'a, C>
[src]

Sends an album in reply to this message.

fn send_message(&'a self, text: impl Into<Text<'a>>) -> SendMessage<'a, C>[src]

Sends a message to this chat.

fn send_message_in_reply(
    &'a self,
    text: impl Into<Text<'a>>
) -> SendMessage<'a, C>
[src]

Sends a message in reply to this message.

fn send_photo(&'a self, photo: Photo<'a>) -> SendPhoto<'a, C>[src]

Sends a photo to this chat.

fn send_photo_in_reply(&'a self, photo: Photo<'a>) -> SendPhoto<'a, C>[src]

Sends a photo in reply to this message.

fn send_poll(
    &'a self,
    question: &'a str,
    options: &'a [&'a str]
) -> SendPoll<'a, C>
[src]

Sends a poll to this chat.

fn send_poll_in_reply(
    &'a self,
    question: &'a str,
    options: &'a [&'a str]
) -> SendPoll<'a, C>
[src]

Sends a poll in reply to this message.

fn send_sticker(&'a self, sticker: Sticker<'a>) -> SendSticker<'a, C>[src]

Sends a sticker to this chat.

fn send_sticker_in_reply(&'a self, sticker: Sticker<'a>) -> SendSticker<'a, C>[src]

Sends a sticker in reply to this message.

fn send_venue(
    &'a self,
    location: (f64, f64),
    title: &'a str,
    address: &'a str
) -> SendVenue<'a, C>
[src]

Sends a venue to this chat.

fn send_venue_in_reply(
    &'a self,
    location: (f64, f64),
    title: &'a str,
    address: &'a str
) -> SendVenue<'a, C>
[src]

Sends a venue in reply to this message.

fn send_video(&'a self, video: Video<'a>) -> SendVideo<'a, C>[src]

Sends a video to this chat.

fn send_video_in_reply(&'a self, video: Video<'a>) -> SendVideo<'a, C>[src]

Sends a video in reply to this message.

fn send_video_note(&'a self, video_note: VideoNote<'a>) -> SendVideoNote<'a, C>[src]

Sends a video note to this chat.

fn send_video_note_in_reply(
    &'a self,
    video_note: VideoNote<'a>
) -> SendVideoNote<'a, C>
[src]

Sends a video note in reply to this message.

fn send_voice(&'a self, voice: Voice<'a>) -> SendVoice<'a, C>[src]

Sends a voice to this chat.

fn send_voice_in_reply(&'a self, voice: Voice<'a>) -> SendVoice<'a, C>[src]

Sends a voice in reply to this message.

fn set_chat_description(
    &'a self,
    description: &'a str
) -> SetChatDescription<'a, C>
[src]

Sets a new description of this chat.

fn set_chat_photo(&'a self, photo: ChatPhoto<'a>) -> SetChatPhoto<'a, C>[src]

Sets a new photo of this chat.

fn set_chat_sticker_set(
    &'a self,
    sticker_set_name: &'a str
) -> SetChatStickerSet<'a, C>
[src]

Sets a new sticker set of this chat.

fn set_chat_title(&'a self, title: &'a str) -> SetChatTitle<'a, C>[src]

Sets a new chat title of this chat.

fn set_message_game_score(
    &'a self,
    message_id: Id,
    user_id: Id,
    score: u32
) -> SetMessageGameScore<'a, C>
[src]

Sets a new high score for a player who played a game in this chat.

fn unban_chat_member(&'a self, user_id: Id) -> UnbanChatMember<'a, C>[src]

Unbans a member of this chat.

fn unpin_chat_message(&'a self) -> UnpinChatMessage<'a, C>[src]

Unpins the pinned message in this chat.

impl<'a, C: 'static> Forwardable<'a, C> for Game<C>[src]

fn forward_to(
    &'a self,
    chat_id: impl ImplicitChatId<'a>
) -> ForwardMessage<'a, C>
[src]

Forwards this message to another chat.

impl<'a, C: 'static> Pinnable<'a, C> for Game<C>[src]

fn pin_this_message(&'a self) -> PinChatMessage<'a, C>[src]

Pins this message.

impl<C: Clone> Clone for Game<C>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<C: Debug> Debug for Game<C>[src]

Auto Trait Implementations

impl<C> Sync for Game<C> where
    C: Send + Sync

impl<C> Send for Game<C> where
    C: Send + Sync

impl<C> Unpin for Game<C>

impl<C> !RefUnwindSafe for Game<C>

impl<C> !UnwindSafe for Game<C>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T