Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Latest commit

 

History

History
65 lines (48 loc) · 2.43 KB

README.md

File metadata and controls

65 lines (48 loc) · 2.43 KB

VK-BOT

A convenient chatbot for interacting with poo.tomedu.ru

EN|ru

Bun MongoDB

TypeScript JavaScript

Visual Studio Code WebStorm

Installation

This project requires Bun latest version.

Clone this repository:

git clone https://github.com/DIARY-SPO/vk-bot

Set up your copy of the project. To do this, create a .env file and specify the main parameters in it:

Name parameter Example Description Required
SERVER_URL https://poo.tomedu.ru/services/security Address to the services of your diary Yes
TOKEN vkq.a.FdSdkdsDfj4ehnEhg... A token from your community, where the bot will be located Yes
LIMIT 20 Limiting api requests NO
ENCRYPTED_KEY jK309nA8XXk5IKm13XRkxJBXD15JHU8F The key for encrypting passwords. Its length should be 32 characters exactly YES
DATABASE_HOST 192.168.0.112 Database host YES
DATABASE_PORT 27017 Database port YES
DATABASE_NAME bot Database name YES
DATABASE_USERNAME admin Database User Name Yes
DATABASE_PASSWORD MyPassword! Password from the Database user Yes

Example of a correctly filled file (see .env.example):

SERVER_URL=https://poo.tomedu.ru/services/security
TOKEN=vkq.a.FdSdkdsDfj4ehnEhg...
ENCRYPTED_KEY=jK309nA8XXk5IKm13XRkxJBXD15JHU8F
DATABASE_HOST=mongodb://localhost:27017
DATABASE_PORT=27017
DATABASE_NAME=bot
DATABASE_USERNAME=admin
DATABASE_PASSWORD=MySuperPassword!
LIMIT=20

Your mongodb database should be running on 27017 port.

Install the dependencies, then start the server.

bun install
bun run --watch main.ts

This file can be supplemented/modified... Follow the changes!