Skip to main content

SendGameBuilder

Struct SendGameBuilder 

Source
pub struct SendGameBuilder<'a> {
    pub business_connection_id: Option<String>,
    pub chat_id: i64,
    pub message_thread_id: Option<i64>,
    pub game_short_name: String,
    pub disable_notification: Option<bool>,
    pub protect_content: Option<bool>,
    pub message_effect_id: Option<String>,
    pub reply_parameters: Option<ReplyParameters>,
    pub reply_markup: Option<InlineKeyboardMarkup>,
    /* private fields */
}

Fields§

§business_connection_id: Option<String>

Unique identifier of the business connection on behalf of which the message will be sent

§chat_id: i64

Unique identifier for the target chat

§message_thread_id: Option<i64>

Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

§game_short_name: String

Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.

§disable_notification: Option<bool>

Sends the message silently. Users will receive a notification with no sound.

§protect_content: Option<bool>

Protects the contents of the sent message from forwarding and saving

§message_effect_id: Option<String>

Unique identifier of the message effect to be added to the message; for private chats only

§reply_parameters: Option<ReplyParameters>

Description of the message to reply to

§reply_markup: Option<InlineKeyboardMarkup>

A JSON-serialized object for an inline keyboard. If empty, one ‘Play game_title’ button will be shown. If not empty, the first button must launch the game.

Implementations§

Source§

impl<'a> SendGameBuilder<'a>

Source

pub fn new(bot: &'a Bot, chat_id: i64, game_short_name: String) -> Self

Source

pub fn business_connection_id(self, business_connection_id: String) -> Self

Source

pub fn chat_id(self, chat_id: i64) -> Self

Source

pub fn message_thread_id(self, message_thread_id: i64) -> Self

Source

pub fn game_short_name(self, game_short_name: String) -> Self

Source

pub fn disable_notification(self, disable_notification: bool) -> Self

Source

pub fn protect_content(self, protect_content: bool) -> Self

Source

pub fn message_effect_id(self, message_effect_id: String) -> Self

Source

pub fn reply_parameters(self, reply_parameters: ReplyParameters) -> Self

Source

pub fn reply_markup(self, reply_markup: InlineKeyboardMarkup) -> Self

Source

pub async fn send(self) -> Result<Message>

Trait Implementations§

Source§

impl<'a> Serialize for SendGameBuilder<'a>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for SendGameBuilder<'a>

§

impl<'a> !UnwindSafe for SendGameBuilder<'a>

§

impl<'a> Freeze for SendGameBuilder<'a>

§

impl<'a> Send for SendGameBuilder<'a>

§

impl<'a> Sync for SendGameBuilder<'a>

§

impl<'a> Unpin for SendGameBuilder<'a>

§

impl<'a> UnsafeUnpin for SendGameBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more