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

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

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

api bot cli rust vkteams

Last synced: 11 months ago
JSON representation

VK Teams Bot API CLI

Awesome Lists containing this project

README

          











# VK Teams Bot API Cli

VK Teams Bot API terminal application.

## Table of Contents

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

## 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

$ cargo install vkteams-bot-cli

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

# Build from source
$ cargo install vkteams-bot-cli
```

## Usage

```bash
# Help
$ vkteams-bot-cli --help
# Listen for events
$ vkteams-bot-cli get-events -l true | grep "ALARM"
# Send text
$ vkteams-bot-cli send-text -u -m "text message"
# Send file
$ vkteams-bot-cli send-file -u -f
# Download file
$ vkteams-bot-cli get-file -i -f
```

## Commands
| Command | Description |
|---------|-------------|
| `get-events` | Listen for events (long polling) |
| `send-text` | Send text message |
| `send-file` | Send file to chat |
| `get-file` | Download file from API |