diff --git a/data/group/commands.js b/data/group/commands.js new file mode 100644 index 0000000..b02d665 --- /dev/null +++ b/data/group/commands.js @@ -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; + + + diff --git a/test.js b/test.js index c085737..6c76beb 100644 --- a/test.js +++ b/test.js @@ -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") } }) \ No newline at end of file