telme/flows/simple_message.js

11 lines
285 B
JavaScript
Raw Normal View History

2020-03-19 18:51:24 +00:00
'use strict';
const TelegramBot = require('node-telegram-bot-api');
class SendMessage {
static async send(token, userId, msg) {
const bot = new TelegramBot(token);
return await bot.sendMessage(userId, `${msg}`, {parse_mode: 'Markdown'});
}
}
module.exports = SendMessage;