message.reply
method)parse_mode
or allow_sending_without_reply
)How to enable logging in your executable
```rust, norun let serverconfig = ApiServerConfig::local("http://localhost", 80, true);
let api_config = APIConfig::new("BOT_TOKEN", server_config)?
let api = API::new(api_config);
```
parse_mode
```rust, no_run let mut api = API::new(/**/);
// Setting parse_mode for sendMessage request
api.set_default_request_param(SendMessageRequest::get_name(), "parse_mode", "html")?;
// For all applicable requests
api.set_parse_mode("html")?;
```
```rust, no_run let mut api = API::new(/**/);
// Required request parameters are in the request constructor, optionals are set via builder-like methods
// ChatId can be username of a channel
let request = api.send_message("@channelusername","Text").reply_to_message_id(42);
// All requests implement IntoFuture
let message = request.await?;
// You can handle some common API errors automatically
let message = API::request(request).await?;
```
```rust, norun
let mut request = api.sendmessage(chatid, "Text");
for i in 0..5 {
request = request.chatid(i);
// &Request implements IntoFuture too
let message = (&request).await?;
}
```
Q: Is it production-ready?
A: It may be, or may be not. The library is not thoroughly tested, some stuff may be broken.
Q: Are there any bots made with it?
A: I developed this library to be used by @hintorbot, so at least this one. If you want to list your bot here, contact me in tg: @encrypted_for