mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-25 23:16:41 +07:00
#1 added handlebars template engine
This commit is contained in:
parent
95ed64c640
commit
eb6a645ad3
10 changed files with 112 additions and 17 deletions
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue