pub struct ForceReply {
pub force_reply: bool,
pub input_field_placeholder: Option<String>,
pub selective: Option<bool>,
}Expand description
Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot’s message and tapped ‘Reply’). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a Telegram Business account.
Fields§
§force_reply: boolShows reply interface to the user, as if they manually selected the bot’s message and tapped ‘Reply’
input_field_placeholder: Option<String>Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters
selective: Option<bool>Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot’s message is a reply to a message in the same chat and forum topic, sender of the original message.
Implementations§
Source§impl ForceReply
impl ForceReply
pub fn noskip(self) -> NoSkipForceReply
Source§impl ForceReply
impl ForceReply
pub fn new(force_reply: bool) -> Self
Sourcepub fn get_force_reply<'a>(&'a self) -> bool
pub fn get_force_reply<'a>(&'a self) -> bool
Shows reply interface to the user, as if they manually selected the bot’s message and tapped ‘Reply’
Sourcepub fn set_force_reply<'a>(&'a mut self, force_reply: bool) -> &'a mut Self
pub fn set_force_reply<'a>(&'a mut self, force_reply: bool) -> &'a mut Self
Shows reply interface to the user, as if they manually selected the bot’s message and tapped ‘Reply’
Sourcepub fn get_input_field_placeholder<'a>(&'a self) -> Option<&'a str>
pub fn get_input_field_placeholder<'a>(&'a self) -> Option<&'a str>
Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters
Sourcepub fn set_input_field_placeholder<'a>(
&'a mut self,
input_field_placeholder: Option<String>,
) -> &'a mut Self
pub fn set_input_field_placeholder<'a>( &'a mut self, input_field_placeholder: Option<String>, ) -> &'a mut Self
Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters
Sourcepub fn get_selective<'a>(&'a self) -> Option<bool>
pub fn get_selective<'a>(&'a self) -> Option<bool>
Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot’s message is a reply to a message in the same chat and forum topic, sender of the original message.
Sourcepub fn set_selective<'a>(&'a mut self, selective: Option<bool>) -> &'a mut Self
pub fn set_selective<'a>(&'a mut self, selective: Option<bool>) -> &'a mut Self
Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot’s message is a reply to a message in the same chat and forum topic, sender of the original message.
Trait Implementations§
Source§impl Clone for ForceReply
impl Clone for ForceReply
Source§fn clone(&self) -> ForceReply
fn clone(&self) -> ForceReply
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ForceReply
impl Debug for ForceReply
Source§impl Default for ForceReply
impl Default for ForceReply
Source§fn default() -> ForceReply
fn default() -> ForceReply
Source§impl<'de> Deserialize<'de> for ForceReply
impl<'de> Deserialize<'de> for ForceReply
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<BoxWrapper<Box<ForceReply>>> for ForceReply
impl From<BoxWrapper<Box<ForceReply>>> for ForceReply
Source§fn from(t: BoxWrapper<Box<ForceReply>>) -> Self
fn from(t: BoxWrapper<Box<ForceReply>>) -> Self
Source§impl From<BoxWrapper<Unbox<ForceReply>>> for ForceReply
impl From<BoxWrapper<Unbox<ForceReply>>> for ForceReply
Source§fn from(t: BoxWrapper<Unbox<ForceReply>>) -> Self
fn from(t: BoxWrapper<Unbox<ForceReply>>) -> Self
Source§impl From<NoSkipForceReply> for ForceReply
impl From<NoSkipForceReply> for ForceReply
Source§fn from(t: NoSkipForceReply) -> Self
fn from(t: NoSkipForceReply) -> Self
Source§impl Hash for ForceReply
impl Hash for ForceReply
Source§impl Into<NoSkipForceReply> for ForceReply
impl Into<NoSkipForceReply> for ForceReply
Source§fn into(self) -> NoSkipForceReply
fn into(self) -> NoSkipForceReply
Source§impl Ord for ForceReply
impl Ord for ForceReply
Source§fn cmp(&self, other: &ForceReply) -> Ordering
fn cmp(&self, other: &ForceReply) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ForceReply
impl PartialEq for ForceReply
Source§impl PartialOrd for ForceReply
impl PartialOrd for ForceReply
Source§impl Serialize for ForceReply
impl Serialize for ForceReply
impl Eq for ForceReply
impl StructuralPartialEq for ForceReply
Auto Trait Implementations§
impl Freeze for ForceReply
impl RefUnwindSafe for ForceReply
impl Send for ForceReply
impl Sync for ForceReply
impl Unpin for ForceReply
impl UnsafeUnpin for ForceReply
impl UnwindSafe for ForceReply
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.