[][src]Crate telexide

Telexide is a rust library for the telegram API

View the examples to see practical examples of how to use the library.

Use the ClientBuilder to easily create a Client object to your preferences and register commands with the create_framework macro and/or register your own update handlers, before running Client::start to start your bot. All of this is designed to be highly customisable. For further information about the client, please see the client's module-level documentation.

API calls are easy to make using the APIClient and the api data models, or create and use your own api client by implementing the API trait. For further information about the api client, please see the api's module-level documentation.

A default command framework is provided using the Framework object, providing easy handling of incoming telegram bot commands sent by users of your bot. For further information about the framework, please see the framework's module-level documentation.

Telegram also has their own API docs for bots. Although this documentation will try to be as accurate as possible, if you need to be sure, refer to their docs.



Add the following to your Cargo.toml file:

telexide = "0.1"



The api module provides the API trait and APIClient, providing methods to perform requests to the telegram API


The Client manages your registered event handlers and provides them with up-to-date access to the api connection.


The framework provides a customizable way to manage your bots commands


Macros for using the framework and helping with adding listeners


Mappings of objects received from the API


A default set of exports which can be helpful to use.



This macro creates the Framework object using the given bot name and registers all the given commands on it. Call it as in create_framework!("bot_name", command1, command2, ...)



The Client is the main object to manage your interaction with telegram.



A common error enum returned by most of the library's functionality

Type Definitions


The common result type between most library functions.