diff --git a/app.js b/app.js index 9fe5e6b..1d47d63 100644 --- a/app.js +++ b/app.js @@ -26,17 +26,16 @@ bot.on('message', (msg) => { const help = "help"; if (msg.text.toString().toLowerCase().includes(help)) { - const userMention = "["+msg.from.first_name+"](tg://user?id="+msg.from.id+")" + const userMention = "@" + msg.from.first_name + "<\/a>" logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked for help"); - // bot.sendMessage(msg.chat.id, "Hello " + userMention + " please PM me @" + process.env.BOT_USERNAME + " and i'll try to help.", { parse_mode: "Markdown" }); - // bot.sendMessage(msg.chat.id, "Hello " + userMention + " please PM me @" + username + " dmd", { parse_mode: "HTML" }); - bot.sendMessage(msg.chat.id, "inline mention of a user" , { parse_mode: "HTML" }); + bot.sendMessage(msg.chat.id, "Hello " + userMention + " please PM me @" + process.env.BOT_USERNAME + " and i'll try to help.", { parse_mode: "HTML" }); } const help_filelinked = "filelinked code"; if (msg.text.toString().toLowerCase().includes(help_filelinked)) { + const userMention = "@" + msg.from.first_name + "<\/a>" logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked for fileLinked code"); - bot.sendMessage(msg.chat.id, "Hello " + msg.from.first_name + " please PM me @" + process.env.BOT_USERNAME + " and i'll help you."); + bot.sendMessage(msg.chat.id, "Hello " + userMention + " please PM me @" + process.env.BOT_USERNAME + " and i'll give you the code"); } const bye = "bye"; @@ -57,14 +56,22 @@ bot.on('message', (msg) => { } const fish = "fish"; - const userMention = "["+msg.from.first_name+"](tg://user?id="+msg.from.id+")" + const userMention = "[" + msg.from.first_name + "](tg://user?id=" + msg.from.id + ")" if (msg.text.toString().toLowerCase().includes(fish)) { - bot.sendMessage(msg.chat.id, test, { parse_mode: "Markdown" }); + bot.sendMessage(msg.chat.id, userMention, { parse_mode: "Markdown" }); + } + + const whatSubShouldIBuy = "what sub should i buy?" + const subs = ["VIP!", "Premium Plus!", "Old Premium!", "Gold!", "Bronze!", "New Premium!", "KDB!", "Technoid!", "Bluemoon!", "SOL!", "Gambler!", "All of em!"] + if (msg.text.toString().toLowerCase().includes(whatSubShouldIBuy)) { + const randomSub = subs[Math.floor(Math.random() * subs.length)]; + bot.sendMessage(msg.chat.id, randomSub); } const deal = "deal"; - // const id = 434187971 + const me = 434187971 + const sarah = 868225940 if (msg.text.toString().toLowerCase().match(/\bdeal\b/)) { bot.sendMessage(msg.chat.id, "I LOVE it when " + msg.from.first_name + ", does a deal :)"); }