Struct botapi::gen_types::ForceReplyBuilder
source · pub struct ForceReplyBuilder {
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: bool
Shows 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 ForceReplyBuilder
impl ForceReplyBuilder
pub fn new(force_reply: bool) -> Self
sourcepub fn set_force_reply(self, force_reply: bool) -> Self
pub fn set_force_reply(self, force_reply: bool) -> Self
Shows reply interface to the user, as if they manually selected the bot’s message and tapped ‘Reply’
sourcepub fn set_input_field_placeholder(
self,
input_field_placeholder: String,
) -> Self
pub fn set_input_field_placeholder( self, input_field_placeholder: String, ) -> Self
Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters
sourcepub fn set_selective(self, selective: bool) -> Self
pub fn set_selective(self, selective: bool) -> 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.
pub fn build(self) -> ForceReply
Trait Implementations§
source§impl Clone for ForceReplyBuilder
impl Clone for ForceReplyBuilder
source§fn clone(&self) -> ForceReplyBuilder
fn clone(&self) -> ForceReplyBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ForceReplyBuilder
impl Debug for ForceReplyBuilder
source§impl Default for ForceReplyBuilder
impl Default for ForceReplyBuilder
source§fn default() -> ForceReplyBuilder
fn default() -> ForceReplyBuilder
source§impl<'de> Deserialize<'de> for ForceReplyBuilder
impl<'de> Deserialize<'de> for ForceReplyBuilder
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 Hash for ForceReplyBuilder
impl Hash for ForceReplyBuilder
source§impl Ord for ForceReplyBuilder
impl Ord for ForceReplyBuilder
source§fn cmp(&self, other: &ForceReplyBuilder) -> Ordering
fn cmp(&self, other: &ForceReplyBuilder) -> 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 ForceReplyBuilder
impl PartialEq for ForceReplyBuilder
source§fn eq(&self, other: &ForceReplyBuilder) -> bool
fn eq(&self, other: &ForceReplyBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ForceReplyBuilder
impl PartialOrd for ForceReplyBuilder
source§fn partial_cmp(&self, other: &ForceReplyBuilder) -> Option<Ordering>
fn partial_cmp(&self, other: &ForceReplyBuilder) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ForceReplyBuilder
impl Serialize for ForceReplyBuilder
impl Eq for ForceReplyBuilder
impl StructuralPartialEq for ForceReplyBuilder
Auto Trait Implementations§
impl Freeze for ForceReplyBuilder
impl RefUnwindSafe for ForceReplyBuilder
impl Send for ForceReplyBuilder
impl Sync for ForceReplyBuilder
impl Unpin for ForceReplyBuilder
impl UnwindSafe for ForceReplyBuilder
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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.