telme/flows/simple_message.js
2020-03-19 14:51:24 -04:00

11 lines
No EOL
285 B
JavaScript

'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;