BBLBTV_Suzie/test.js
karl.hudgell dd607e15c4 update
2020-06-29 21:39:15 +01:00

21 lines
503 B
JavaScript

require('dotenv').config();
const TelegramBot = require('node-telegram-bot-api');
const token = process.env.BOT_TOKEN;
const bot = new TelegramBot(token, { polling: true });
function t(msg, input) {
let commands = require('./data/group/commands')
bot.sendMessage(msg.chat.id, input)
}
bot.on('message', (msg) => {
if (msg.text && msg.text.toString().includes("/sub_status")) {
t(msg, "/sub_status")
}
if (msg.text && msg.text.toString().includes("/help")) {
t(msg, "/help")
}
})