Sagi Dayan
2db82b708d
- Changed from js to ts - Added implementation for profiles - Can also be used as a node_module
9 lines
357 B
TypeScript
9 lines
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' });
|
|
}
|
|
} |