This commit is contained in:
karl.hudgell 2020-06-29 21:39:15 +01:00
parent 71a69c5f9b
commit dd607e15c4
2 changed files with 16 additions and 2 deletions

13
data/group/commands.js Normal file
View File

@ -0,0 +1,13 @@
const commands = [
{
"NAME": "/help",
"TEXT": [
"Hello " + userMention + " please PM me @" + process.env.BOT_USERNAME + " and i'll try to help.",
]
}
]
module.exports = commands;

View File

@ -5,6 +5,7 @@ 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)
}
@ -14,7 +15,7 @@ bot.on('message', (msg) => {
t(msg, "/sub_status")
}
if (msg.text && msg.text.toString().includes("/test")) {
t(msg, "/test")
if (msg.text && msg.text.toString().includes("/help")) {
t(msg, "/help")
}
})