pub struct AppApi { /* private fields */ }Expand description
Stable app-facing high-level facade for common bot workflows.
Implementations§
Source§impl AppApi
impl AppApi
Sourcepub fn moderation(&self) -> ModerationApi
pub fn moderation(&self) -> ModerationApi
Dedicated moderation/admin facade for governance actions.
Sourcepub fn text(
&self,
chat_id: impl Into<ChatId>,
text: impl Into<String>,
) -> Result<TextSendBuilder>
pub fn text( &self, chat_id: impl Into<ChatId>, text: impl Into<String>, ) -> Result<TextSendBuilder>
Starts a high-level text send to a target chat.
Sourcepub fn reply(
&self,
update: &Update,
text: impl Into<String>,
) -> Result<TextSendBuilder>
pub fn reply( &self, update: &Update, text: impl Into<String>, ) -> Result<TextSendBuilder>
Starts a high-level text send using the canonical reply chat derived from an update.
Sourcepub async fn send_text(
&self,
chat_id: impl Into<ChatId>,
text: impl Into<String>,
) -> Result<Message>
pub async fn send_text( &self, chat_id: impl Into<ChatId>, text: impl Into<String>, ) -> Result<Message>
Sends plain text to a target chat.
Sourcepub async fn reply_text(
&self,
update: &Update,
text: impl Into<String>,
) -> Result<Message>
pub async fn reply_text( &self, update: &Update, text: impl Into<String>, ) -> Result<Message>
Replies to a chat derived from an incoming update.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppApi
impl !RefUnwindSafe for AppApi
impl Send for AppApi
impl Sync for AppApi
impl Unpin for AppApi
impl UnsafeUnpin for AppApi
impl !UnwindSafe for AppApi
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