1 unstable release

0.1.0 Nov 14, 2021

#15 in #reqwest-client

MIT license

6.5K SLoC


Active Development

Telbot provides telegram bot types and API wrappers.

Specifically, telbot now supports:

  • telbot-types: basic telegram types / requests / responses
telbot-types = "0.2.0"
  • telbot-cf-worker: API wrapper for cloudflare workers
telbot-cf-worker = "0.2.0"
  • telbot-ureq: API wrapper for ureq client
telbot-ureq = "0.2.0"
  • telbot-reqwest: API wrapper for reqwest client
telbot-reqwest = "0.1.0"


Extending telbot

You can implement two methods, send_json and send_file with your own http client to create your own API wrapper.

send_json should serialize JsonMethod into json format and send it to the API endpoint.

send_file should serialize FileMethod into multipart/form-data format and send it to the API endpoint.

files(&self) method in FileMethod helps getting fields of type InputFileVariant.

For the ease of serializing, both JsonMethod and FileMethod implements serde::Serialize.

TelegramMethod, the super trait of both JsonMethod and FileMethod, provides name() method, which can be used to get the method's name in &str format.


telbot is not a mature project yet, so your help will be very helpful.

Please leave an issue if you find wrongly coded piece or get a nice idea to improve telbot.


~247K SLoC