pub struct TelegramBot { /* private fields */ }Expand description
Telegram bot client.
Implementations§
Source§impl TelegramBot
impl TelegramBot
pub fn new(config: TelegramConfig) -> Self
Sourcepub fn parse_command(text: &str) -> TelegramCommand
pub fn parse_command(text: &str) -> TelegramCommand
Parse a Telegram command from message text.
Trait Implementations§
Source§impl ChatPlatform for TelegramBot
impl ChatPlatform for TelegramBot
Source§async fn send_message(&self, msg: &OutgoingMessage) -> Result<String>
async fn send_message(&self, msg: &OutgoingMessage) -> Result<String>
Send a message to a channel.
Source§async fn send_approval(
&self,
channel_id: &str,
request: &ApprovalRequest,
) -> Result<String>
async fn send_approval( &self, channel_id: &str, request: &ApprovalRequest, ) -> Result<String>
Send an approval request with interactive buttons.
Source§async fn update_message(
&self,
channel_id: &str,
message_id: &str,
text: &str,
) -> Result<()>
async fn update_message( &self, channel_id: &str, message_id: &str, text: &str, ) -> Result<()>
Update an existing message.
Source§async fn add_reaction(
&self,
channel_id: &str,
message_id: &str,
emoji: &str,
) -> Result<()>
async fn add_reaction( &self, channel_id: &str, message_id: &str, emoji: &str, ) -> Result<()>
React to a message with an emoji.
Source§async fn send_progress(
&self,
channel_id: &str,
thread_id: &str,
progress: &ProgressUpdate,
) -> Result<String>
async fn send_progress( &self, channel_id: &str, thread_id: &str, progress: &ProgressUpdate, ) -> Result<String>
Send a progress update (step started/completed) in a thread.
Source§async fn send_notification(
&self,
channel_id: &str,
thread_id: Option<&str>,
notification: &WorkflowNotification,
) -> Result<String>
async fn send_notification( &self, channel_id: &str, thread_id: Option<&str>, notification: &WorkflowNotification, ) -> Result<String>
Send a workflow completion/failure notification.
Auto Trait Implementations§
impl Freeze for TelegramBot
impl !RefUnwindSafe for TelegramBot
impl Send for TelegramBot
impl Sync for TelegramBot
impl Unpin for TelegramBot
impl UnsafeUnpin for TelegramBot
impl !UnwindSafe for TelegramBot
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