mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-25 15:06:41 +07:00
#1 added class comments
This commit is contained in:
parent
1754092f7c
commit
1a4903c6f0
1 changed files with 6 additions and 0 deletions
|
@ -8,6 +8,9 @@ import { VkEventHandler } from "./handlers/VkEventHandler";
|
||||||
import { vkEventToHandler } from "./handlers";
|
import { vkEventToHandler } from "./handlers";
|
||||||
import { TelegramService } from "../telegram";
|
import { TelegramService } from "../telegram";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Service to handle VK to Telegram interactions
|
||||||
|
*/
|
||||||
export class VkService {
|
export class VkService {
|
||||||
public endpoint: string = "/";
|
public endpoint: string = "/";
|
||||||
private readonly instances: Record<string, GroupInstance>;
|
private readonly instances: Record<string, GroupInstance>;
|
||||||
|
@ -61,6 +64,9 @@ export class VkService {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates vk bot instance for each group with api, uploader and updates handler
|
||||||
|
*/
|
||||||
private createGroupInstance = (group: ConfigGroup): GroupInstance => {
|
private createGroupInstance = (group: ConfigGroup): GroupInstance => {
|
||||||
const api = new API({
|
const api = new API({
|
||||||
token: group.apiKey,
|
token: group.apiKey,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue