1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-04-25 15:06:41 +07:00

#1 added handlebars template engine

This commit is contained in:
Fedor Katurov 2021-04-29 10:30:01 +07:00
parent 95ed64c640
commit eb6a645ad3
10 changed files with 112 additions and 17 deletions

View file

@ -4,6 +4,7 @@ import logger from "../logger";
import { Response } from "express";
import { Update } from "typegram";
import loggerTgMiddleware from "../logger/tg";
import { ExtraReplyMessage } from "telegraf/typings/telegram-types";
// import SocksProxyAgent from 'socks-proxy-agent';
@ -74,4 +75,16 @@ export class TelegramService {
// TODO: test this.webhook.url with axios instead of 'true'
return isWebhookEnabled && true;
};
/**
* Sends simple message to channel
*/
public sendMessageToChan = async (
channel: string,
message: string,
extra?: ExtraReplyMessage
) => {
await this.bot.telegram.sendMessage(channel, message, extra);
return;
};
}