pub struct SetGameScore { /* private fields */ }Expand description
Builder for the setGameScore method.
Sets the score for a user in a game. Returns the edited Message on success
for chat messages, or true for inline messages.
Returns an error if the new score is not greater than the user’s current score
and force is not set.
Implementations§
Source§impl SetGameScore
impl SetGameScore
Sourcepub fn force(self, v: bool) -> Self
pub fn force(self, v: bool) -> Self
Pass true to allow the score to decrease — useful for fixing mistakes or banning cheaters.
Sourcepub fn disable_edit_message(self, v: bool) -> Self
pub fn disable_edit_message(self, v: bool) -> Self
Pass true to prevent the game message from being edited with the new scoreboard.
Sourcepub fn chat_message(self, chat_id: i64, message_id: i64) -> Self
pub fn chat_message(self, chat_id: i64, message_id: i64) -> Self
Sets the target chat message. Required if inline_message_id is not set.
Sourcepub fn inline_message_id(self, id: impl Into<String>) -> Self
pub fn inline_message_id(self, id: impl Into<String>) -> Self
Sets the target inline message. Required if chat_id and message_id are not set.
Trait Implementations§
Source§impl IntoFuture for SetGameScore
impl IntoFuture for SetGameScore
Source§type IntoFuture = Pin<Box<dyn Future<Output = <SetGameScore as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <SetGameScore as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SetGameScore
impl !UnwindSafe for SetGameScore
impl Freeze for SetGameScore
impl Send for SetGameScore
impl Sync for SetGameScore
impl Unpin for SetGameScore
impl UnsafeUnpin for SetGameScore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more