9 lines
No EOL
357 B
TypeScript
9 lines
No EOL
357 B
TypeScript
'use strict';
|
|
const TelegramBot = require('node-telegram-bot-api');
|
|
import { IProfileConfig } from '../config/config';
|
|
export default class SendMessage {
|
|
static async send(config: IProfileConfig, msg: string) {
|
|
const bot = new TelegramBot(config.bot_token);
|
|
return await bot.sendMessage(config.chat_id, `${msg}`, { parse_mode: 'Markdown' });
|
|
}
|
|
} |