An open API service indexing awesome lists of open source software.

https://github.com/bug-ops/vkteams-bot

VK Teams Bot API Client
https://github.com/bug-ops/vkteams-bot

api bot rust vkteams

Last synced: about 1 year ago
JSON representation

VK Teams Bot API Client

Awesome Lists containing this project

README

          



docs.rs


crates.io


github.com


Unsafe forbidden

# VK Teams Bot API client

VK Teams Bot API client written in Rust.

## Table of Contents

- [Environment](#environment)
- [Usage](#usage-examples)

## Environment

1. Begin with bot API following [instructions](https://teams.vk.com/botapi/?lang=en)

2. Set environment variables or save in `.env` file

```bash
# Unix-like
$ export VKTEAMS_BOT_API_TOKEN= #require
$ export VKTEAMS_BOT_API_URL= #require
$ export VKTEAMS_PROXY= #optional

# Windows
$ set VKTEAMS_BOT_API_TOKEN= #require
$ set VKTEAMS_BOT_API_URL= #require
$ set VKTEAMS_PROXY= #optional
```

3. Put lines in you `Cargo.toml` file

```toml
[dependencies]
vkteams_bot = { version = "0.6", feature = ["full"] }
log = "0.4"
```

## Usage examples

[Examples:](examples)

- [new message](examples/new_message.rs)
- [new message / edit message](examples/emul_chat_gpt.rs)
- [event listener](examples/event_listener.rs)
- [answer callback query](examples/callback_query.rs)
- [chat - get info](examples/chat_get_info.rs)
- [chat admin - avatar set](examples/chat_admin_avatar_set.rs)
- [chat - download files](examples/chat_get_file.rs)
- [bot - webhook handler](examples/prometheus_webhook.rs)