KartulUdus / PoracleJS

NodeJS application for PokémonGo WebHook Discord alarms

Home Page:https://kartuludus.github.io/PoracleJS/#/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guide to configure local.json file

Gabbiano83BG opened this issue · comments

I'm trying to configure for the first time PoracleJS, but I cannot see any documentation about local.json file.

I'm unable to find a useful documentation about local.json configuration option and properties.
I've disable discord hooking and enable telegram, but I got following error:

error: Can't seem to handle monster:  Cannot read property 'toLowerCase' of undefined {"stack":"TypeError: Cannot read property 'toLowerCase' of undefined\n    at /opt/PoracleJS/src/controllers/controller.js:134:59\n    at Array.map (<anonymous>)\n    at Monster.pointInArea (/opt/PoracleJS/src/controllers/controller.js:134:35)\n    at Monster.handle (/opt/PoracleJS/src/controllers/monster.js:177:30)\n    at Timeout.handleAlarms [as _onTimeout] (/opt/PoracleJS/src/app.js:167:52)\n    at listOnTimeout (internal/timers.js:549:17)\n    at processTimers (internal/timers.js:492:7)"}
(node:16522) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'forEach' of undefined
    at Timeout.handleAlarms [as _onTimeout] (/opt/PoracleJS/src/app.js:168:12)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:16522) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 136)
debug: Wild encounter 8133570773608321000 was sent again too soon, ignoring
debug: Wild encounter 13800137623495617000 was sent again too soon, ignoring
debug: Wild encounter 13806142494322936000 was sent again too soon, ignoring

Any ideas?

my current config:

{
    "server": {
        "host": "127.0.0.1",
        "port": "4201",
        "ipWhitelist": [],
        "ipBlacklist": []
    },
    "general": {
        "environment": "production",
        "alertMinimumTime": 120,
        "imgUrl": "https://raw.githubusercontent.com/nileplumb/PkmnShuffleMap/master/PMSF_icons_large/",
        "locale": "en",
        "weatherChangeAlert": true
    },
    "logger": {
        "level": "**debug**",
        "logSize": 25
    },
    "database": {
        "client": "sqlite",
        "conn": {
            "host": "127.0.0.1",
            "database": "poracle",
            "user": "poracleuser",
            "password": "poraclepassword",
            "port": 3306
        }
    },
    "locale": {
        "timeformat": "en-gb",
        "time": "LTS",
        "addressFormat": "{{ streetName}} {{ streetNumber }}:",
        "language": "en"
    },
    "discord": {
        "enabled": **false**,
        "unknownResponse": false,
        "invite": "",
        "token": [],
        "channels": [
            "533927791096233984"
        ],
        "userRole": [
            "roleId1",
            "358207117951369217"
        ],
        "admins": [
            "222742859059560458"
        ],
        "prefix": "!",
        "limitSec": 30,
        "limitAmount": 20,
        "ivColors": [
            "#9D9D9D",
            "#FFFFFF",
            "#1EFF00",
            "#0070DD",
            "#A335EE",
            "#FF8000"
        ]
    },
    "telegram": {
        "enabled": **true**,
        "token": "**<BOT TOKEN ID>**",
        "admins": [
            "telegram admin id"
        ],
        "channels": [
            "**@channel1name**"
        ]
    },
    "geocoding": {
        "provider": "poracle",
        "staticProvider": "poracle",
        "geocodingKey": [
            "Your Google Geocoding Key if you Use google as provider"
        ],
        "staticKey": [
            "Your MapQuest or Google Key"
        ],
        "width": 320,
        "height": 200,
        "zoom": 15,
        "spriteHeight": 20,
        "spriteWidth": 20,
        "scale": 2,
        "type": "klokantech-basic"
    }
}

Please join discord if still an issue, closing as part of general tidy up