Struct telebot::bot::RcBot
[−]
[src]
pub struct RcBot { pub inner: Rc<Bot>, }
A clonable, single threaded bot
The outer API gets implemented on RcBot
Fields
inner: Rc<Bot>
Methods
impl RcBot
[src]
impl RcBot
[src]
fn update_interval(self, interval: u64) -> RcBot
[src]
Sets the update interval to an integer in milliseconds
fn new_cmd(
&self,
cmd: &str
) -> impl Stream<Item = (RcBot, Message), Error = Error>
[src]
&self,
cmd: &str
) -> impl Stream<Item = (RcBot, Message), Error = Error>
Creates a new command and returns a stream which will yield a message when the command is send
fn register<T>(&self, hnd: T) where
T: Stream + 'static,
[src]
T: Stream + 'static,
Register a new commnd
fn get_stream<'a>(
&'a self
) -> impl Stream<Item = (RcBot, Update), Error = Error> + 'a
[src]
&'a self
) -> impl Stream<Item = (RcBot, Update), Error = Error> + 'a
The main update loop, the update function is called every update_interval milliseconds When an update is available the last_id will be updated and the message is filtered for commands The message is forwarded to the returned stream if no command was found
fn run<'a>(&'a self, core: &mut Core) -> Result<(), Error>
[src]
helper function to start the event loop
Trait Implementations
impl Clone for RcBot
[src]
fn clone(&self) -> RcBot
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl FunctionGetMe for RcBot
[src]
fn get_me(&self) -> WrapperGetMe
[src]
impl FunctionGetUpdates for RcBot
[src]
fn get_updates(&self) -> WrapperGetUpdates
[src]
impl FunctionMessage for RcBot
[src]
fn message(&self, _chat_id: Integer, _text: String) -> WrapperMessage
[src]
impl FunctionSendPhoto for RcBot
[src]
fn photo(&self, _chat_id: Integer) -> WrapperSendPhoto
[src]
impl FunctionSendAudio for RcBot
[src]
fn audio(&self, _chat_id: Integer) -> WrapperSendAudio
[src]
impl FunctionSendDocument for RcBot
[src]
fn document(&self, _chat_id: Integer) -> WrapperSendDocument
[src]
impl FunctionSendSticker for RcBot
[src]
fn sticker(&self, _chat_id: Integer) -> WrapperSendSticker
[src]
impl FunctionSendVideo for RcBot
[src]
fn video(&self, _chat_id: Integer) -> WrapperSendVideo
[src]
impl FunctionSendVoice for RcBot
[src]
fn voice(&self, _chat_id: Integer) -> WrapperSendVoice
[src]
impl FunctionSendLocation for RcBot
[src]
impl FunctionSendVenue for RcBot
[src]
fn venue(
&self,
_chat_id: Integer,
_latitude: f32,
_longitude: f32,
_title: String,
_address: String
) -> WrapperSendVenue
[src]
&self,
_chat_id: Integer,
_latitude: f32,
_longitude: f32,
_title: String,
_address: String
) -> WrapperSendVenue
impl FunctionSendContact for RcBot
[src]
fn contact(
&self,
_chat_id: Integer,
_phone_number: String,
_first_name: String
) -> WrapperSendContact
[src]
&self,
_chat_id: Integer,
_phone_number: String,
_first_name: String
) -> WrapperSendContact
impl FunctionSendAction for RcBot
[src]
fn chat_action(&self, _chat_id: Integer, _action: String) -> WrapperSendAction
[src]
impl FunctionGetUserProfilePhotos for RcBot
[src]
fn get_user_profile_photos(
&self,
_user_id: Integer
) -> WrapperGetUserProfilePhotos
[src]
&self,
_user_id: Integer
) -> WrapperGetUserProfilePhotos
impl FunctionGetFile for RcBot
[src]
fn get_file(&self, _file_id: String) -> WrapperGetFile
[src]
impl FunctionKickChatMember for RcBot
[src]
fn kick_chat_member(
&self,
_chat_id: Integer,
_user_id: Integer
) -> WrapperKickChatMember
[src]
&self,
_chat_id: Integer,
_user_id: Integer
) -> WrapperKickChatMember
impl FunctionLeaveChat for RcBot
[src]
fn leave_chat(&self, _chat_id: Integer) -> WrapperLeaveChat
[src]
impl FunctionUnbanChatMember for RcBot
[src]
fn unban_chat_member(
&self,
_chat_id: Integer,
_user_id: Integer
) -> WrapperUnbanChatMember
[src]
&self,
_chat_id: Integer,
_user_id: Integer
) -> WrapperUnbanChatMember
impl FunctionGetChat for RcBot
[src]
fn get_chat(&self, _chat_id: Integer) -> WrapperGetChat
[src]
impl FunctionGetChatAdministrators for RcBot
[src]
fn unban_chat_administrators(
&self,
_chat_id: Integer
) -> WrapperGetChatAdministrators
[src]
&self,
_chat_id: Integer
) -> WrapperGetChatAdministrators
impl FunctionGetChatMemberCounts for RcBot
[src]
fn get_chat_members_count(
&self,
_chat_id: Integer
) -> WrapperGetChatMemberCounts
[src]
&self,
_chat_id: Integer
) -> WrapperGetChatMemberCounts
impl FunctionGetChatMember for RcBot
[src]
fn get_chat_members_count(
&self,
_chat_id: Integer,
_user_id: Integer
) -> WrapperGetChatMember
[src]
&self,
_chat_id: Integer,
_user_id: Integer
) -> WrapperGetChatMember
impl FunctionAnswerCallbackQuery for RcBot
[src]
fn answer_callback_query(
&self,
_callback_query_id: String
) -> WrapperAnswerCallbackQuery
[src]
&self,
_callback_query_id: String
) -> WrapperAnswerCallbackQuery
impl FunctionAnswerInlineQuery for RcBot
[src]
fn answer_inline_query(
&self,
_inline_query_id: String,
_results: Vec<Box<Serialize>>
) -> WrapperAnswerInlineQuery
[src]
&self,
_inline_query_id: String,
_results: Vec<Box<Serialize>>
) -> WrapperAnswerInlineQuery