freifunk-bot

Modular parser for the hackerspace door status with handlers for multiple services
git clone git://archive.git.mtrnord.blog/MTRNord/freifunk-bot.git
Log | Files | Refs | README | LICENSE

commit 0e9d43e1c71f85d0d667883e9f1fe5eab75c6b8f
parent 60862975c8738882a2b4ca924e5d7163734ffa9d
Author: Marcel <MTRNord@users.noreply.github.com>
Date:   Fri,  2 Jun 2017 14:57:12 +0200

Update telegram.js
Diffstat:
Mhandlers/telegram.js | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/handlers/telegram.js b/handlers/telegram.js @@ -26,7 +26,7 @@ module.exports = { jsonfile.readFile('handlers/tmp/communities.json', 'utf8', function (err,obj) { if (err) {throw new Error(err);} var communities = obj - _.find(communities.communities, function (key) { + _.find(communities, function (key) { var ccode = key; if (ccode.toLowerCase() === resp.toLowerCase()) { getNodes.countNodes(resp.toLowerCase(), "telegram", fromId, msg, "", bot, botan) @@ -45,7 +45,7 @@ module.exports = { jsonfile.readFile('handlers/tmp/communities.json', 'utf8', function (err,obj) { if (err) {throw new Error(err);} var communities = obj - _.find(communities.communities, function (key) { + _.find(communities, function (key) { var ccode = key; if (ccode.toLowerCase() === args[0].toLowerCase()) { getNodes.NodeInfo(args[0].toLowerCase(), args[1].toLowerCase(), "telegram", fromId, msg, "", bot, botan) @@ -63,7 +63,7 @@ module.exports = { jsonfile.readFile('handlers/tmp/communities.json', 'utf8', function (err,obj) { var communities = obj var communities_list = "" - _.find(communities.communities, function (key) { + _.find(communities, function (key) { var ccode = key var name = key["name"] communities_list = communities_list + name + ": " + ccode + "\n"