11 lines
No EOL
285 B
JavaScript
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; |