fixed the message

This commit is contained in:
karl.hudgell 2020-06-28 22:04:01 +01:00
parent 900c598c15
commit 067a264606

View File

@ -24,7 +24,7 @@ module.exports = {
}, },
appSwitch: (bot, msg, logger) => { appSwitch: (bot, msg, logger) => {
let string = "" let string = ""
if (subArray.indexOf(msg.text && msg.text.toString().toLowerCase())) { if (subArray.splice(-1,1).some(v => msg.text.toString().includes(v))) {
var checkSub = msg.text.substring(2) var checkSub = msg.text.substring(2)
subs.forEach(element => { subs.forEach(element => {
if (element.SUB === checkSub) { if (element.SUB === checkSub) {
@ -37,5 +37,19 @@ module.exports = {
); );
bot.sendMessage(msg.chat.id, "You can use -" + string + "\n\nAll can be downloaded from our FileLinked") bot.sendMessage(msg.chat.id, "You can use -" + string + "\n\nAll can be downloaded from our FileLinked")
} }
// }
// if (subArray.indexOf(msg.text && msg.text.toString().toLowerCase())) {
// var checkSub = msg.text.substring(2)
// subs.forEach(element => {
// if (element.SUB === checkSub) {
// element.APPS.forEach(element => {
// let catString = element
// string += '\n' + catString;
// })
// }
// }
// );
// bot.sendMessage(msg.chat.id, "You can use -" + string + "\n\nAll can be downloaded from our FileLinked")
// }
} }
} }