## Highlights
- Easily integrate rustygram into your rust application to quickly send messages to Telegram bots, groups, and channels.
- Send asynchronous notifications in a reliable way.
## API overview
- `create_bot` - create a bot instance consistsing of Telegram's bot token, and target chat_id
- `send_message` - call Telegram bot's API sendMessage to send message asynchronously
## Examples
### Send in simple way
```rust
fn main() {
let instance = rustygram::create_bot("123456:123456", "-1000000");
if let Err(_) = rustygram::send_message(&instance, "Hello world", None) {
// error handling here...
}
}
```
### Send in `MarkdownV2` or `HTML` style message
Send message in `MarkdownV2`
```rust
use rustygram::types::{SendMessageOption, SendMessageParseMode};
fn main() {
let instance = rustygram::create_bot("16", "-1s00");
let option = SendMessageOption { parse_mode: Some(SendMessageParseMode::MarkdownV2) };
// note on two spaces at the end of the line for a new line in markdown
if let Err(_) = rustygram::send_message(&instance,
r#"__Hello world__
`Tap to copy this text`
Visit my [website](https://yong-kang.super.site/)"#, Some(option)) {
// error handling here...
}
}
```
Send messsage in `HTML`
```rust
use rustygram::types::{SendMessageOption, SendMessageParseMode};
fn main() {
let instance = rustygram::create_instance("189:blablabla", "-10");
let option = SendMessageOption { parse_mode: Some(SendMessageParseMode::HTML) };
if let Err(_) = rustygram::send_message(&instance,
r#"