Coder Social home page Coder Social logo

kartuludus / poraclejs Goto Github PK

View Code? Open in Web Editor NEW
94.0 94.0 115.0 28.33 MB

NodeJS application for PokémonGo WebHook Discord alarms

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

License: ISC License

JavaScript 99.60% Dockerfile 0.03% Shell 0.37%

poraclejs's People

Contributors

auisgold avatar bbdoc avatar bmpgo avatar darkelement1987 avatar darthstap avatar fabio1988 avatar fosjoddie avatar hamster007github avatar ichhabrecht avatar jfberry avatar kartuludus avatar kinrre avatar kneckter avatar lenisko avatar muckelba avatar na-ji avatar nakratz avatar petap0w avatar philcerf avatar plinytheelder avatar quiddity-wp avatar raphael1700 avatar reedy avatar reuschelcgn avatar sabregreen avatar seehuge avatar senorkarlos avatar turtiesocks avatar unseenmagik avatar xerockxmg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

poraclejs's Issues

Dynamic loading of DTS & Geofence file

Since Poracle currently resends all the active notifications on a restart, it is best to avoid restarts as much as possible. However changing DTS or adding a new location to the geofence file currently requires a reload.

It would be great if Poracle could detect changes in those files and dynamically load them without a restart of the entire service.

Expected Behavior

Admin makes changes to dts.json, and saves the file. Poracle detects the change and loads the new DTS or geofence file.

Current Behavior

Currently the Poracle service has to be restarted to pick up new DTS or Geofence.

multi message mode for TG-bot replies like from /help

Hey.

The following is absolutely not that important,... so just close it if you don't see an easy way.

I recently started with a localised version for a /help text for our community here, and quickly ran into the problem, that Telegram has a pretty small maximum message size, and apparently also a maximum number of format codes it accepts per message.

So would be nice if one could set the reply for such commands to be split into multiple messages from the bot, cause when one wants to explain "all" aspects of poracle, one can easily hit the limit.

Cheers!

Clean History Command

Discord doesn't let users delete DMs received from bot, which means that if

  • They didn' activate cleaning from the beginning on their alarms
  • Poracle was restarted and thus some messages were not correctly cleaned

... users en up with old message in the DM to the bot which they cannot remove.

The Bot itself should be able to remove those messages using the API.

Would it be possible to add a !clean_history command that would remove all old messages sent by the bot so users can keep a clean channel ?

This is a pure discord only issue, Telegram has an integrated "clean history" capability.

Feature: A Map with overlays of distance-radius circles

Context

This will

  • help people to set perfect distances for themselves, and
  • better understand how the distance-feature works.

Desired Behavior

As a user, I want a Map that shows my centered Poracle !location, with overlay circles showing the distance-radius for 0.5/1/2/3/4/5 kilometres away.

Possible Solution

Perhaps there's some way to make GoogleMaps automatically show an overlay like this, as output from the !tracked command?

Or, maybe someone can invent a !radius command? :-D

Example: I've found this site, which kinda works, but it doesn't adjust the placement of the circles if you type in a new address directly (awkward drag-and-drop x5, or you have to recreate the circles yourself from a fresh map).
E.g. 0.5km/1km/2km circles. https://www.mapdevelopers.com/draw-circle-tool.php?circles=%5B%5B1000%2C43.3199051%2C6.2897851%2C%22%23AAAAAA%22%2C%22%23000000%22%2C0%5D%2C%5B500%2C43.3199051%2C6.2897851%2C%22%23AAAAAA%22%2C%22%23000000%22%2C0%5D%2C%5B2000%2C43.3199051%2C6.2897851%2C%22%23AAAAAA%22%2C%22%23000000%22%2C0%5D%5D

Future documentation notes

🗺️ 🔴 💠 Maps radius circles! -- "How far away is that park?" -- Wonder no more! 0.5km/1km/2km circles! Type !radius 123 common road, town to see a visualization.

Feature : Allow quests tracking to track mega-energy for a specific Pokemon.

Allow quests tracking to track mega-energy for a specific Pokemon.

At the moment you can only track based on the amount of mega energy, but most people don't care about the amount mega-energy if it's not for the pokemon they need it.

This would request the addition of a new column in DB as currently, there is only one reward column, being used both for the pokemon_id (reward_type 7) and for the amount of mega-energy (reward-type 12). Pokemon_id would need to be stored in a separate field together with the amount of energy available in reward.

when starting v4 initial notification are AM/PM

Expected Behavior

all notifications should be 24h format, for me at least :P

Current Behavior

at v4 start/restart initial notifications are en 12 hour format afterwards notifications are send in 24h format

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. npm 5.6.0, nodejs v7.4.0):
  • Operating System

[Feature Request] DnD (Do Not Disturb)

Add DnD (Do Not Disturb) to PoracleJS bot.
This would save some webhook calls and as well some nerves / frustration.

First of all it might be good to state which version would be better in long term.
Easy one is as simple as setting static hours range for all days and switching it on / off. Might be good for starter.
Hard way would be based on schedules, where user can define more than one DnD rules for a week days.

Easy Way

Expected Behavior

  • !dnd <hours_range> - enable DnD schedule on current user for provided hours range.
    • !dnd 22-8 - enable DnD from 22:00 till 8:00 everyday
  • !dnd off - disable DnD schedule for current user.

Notes

  • Times should be handled in UTC ?? otherwise we would need to collect user timezones.

DB Changes Proposal

Add a default empty list [] to humans table names dnd.
When enabled the list would become [start_hour, end_hour].


Hard Way

Expected Behavior

  • !dnd on - enable DnD schedule for current user.
  • !dnd off - disable DnD schedule for current user.
  • !dnd add <week_day_range> <hours_range> - Add DnD on current user for provided week days and hours range.
    • !dnd add 1-5 22-14 - DnD from Monday to Friday from 22:00 till 14:00.
    • !dnd add 6-7 0-6 - DnD on Saturday Sunday from 00:00 till 6:00.
  • !dnd list - List all added DnD's for current user with id.
  • !dnd del <id> - Remove DnD with provided id for current user.

Notes

  • Split days range by -, first argument needs to be smaller then second (easier to parse later on).
  • on / off sounds looks better than start / stop I think ,-)
  • Times should be handled in UTC ?? otherwise we would need to collect user timezones.
  • Cron for cleanup based on last user activity?
  • Make sure we validate user_id upon removal.
  • Make it clear how days/times range work. For example we have schedule rule 1-2 23-5 Monday, Tuesday from 23:00 till 5:00 - we are starting at Monday 23:00 and stopping at Tuesday 5:00 or starting at Monday 23:00 and stopping at Wednesday 5:00?

DB Changes Proposal

Add new table dnd_schedule

id - used to removal (auto increment)
user_id - obvious
added_at - datetime of schedule addition, might be useful for cleanup? for example we keep those for 3 months after last user activity?
weekday_start - number of week day we start dnd rule
weekday_end - number of week day we stop dnd rule
hour_start - start of dnd hour
hour_end - end of dnd hour

update names

Poracle is working on id, which is logical, but when changing discord channel name or discord user name stuf can become misleading. Consider adding i.e. a daily sync of name in order to keep it alligned.

Removal of Invasion tracking doesn't work as expected

Usually not a problem because 99% of users hate doing Rocket Battles. But with the recent Event, users registered for Rocket Invasions and have no idea how to remove them.

With normal notifications the following commands work:
!untrack everything or !raid remove everything, etc.

But for Rocket Invasions,
!invasion remove everything does not work.

Users have to remove the notifications one by one for it to register correctly.
!invasion remove dark, !invasion remove ice, etc.

Feature Request: instead of distance, allow to specify s2 cell IDs

Hey.

One idea would be to allow users to specify S2 cell ID either globally (with a switch?), or perhaps even per track-rule, in order to decide whether they get notified or not.

Yes, these are the same S2 cells as used by Pokemon Go.

There's a nice Python binding (https://github.com/google/s2geometry/ - this is the "complete" and official one... there's another one which is however mostly unmaintained).

This would also allow people to track in different locations (e.g. work and home... or home + where some friends lives whom one would give access to one's PoGo account).
It would also allow to specify more realist regions of interest (rather than circles)... e.g. a less big square around one's home and then arms along bus or subway routes. Or one could cut of unreachable areas (which are now included in the circle), like e.g. when a river is in between.

An implementation should probably allow to specify a minimum and maximum S2cell level.
Objects in s2geometry allow for simple normalisation of multiple cells (i.e. the four level16 cells of an enclosing level15 cells would be merged).
It's also simple (and fast) to check whether a point (e.g. the pokemon location) is contained in any of the cells.

The cells could be stored as string in the DB (though this would get quite large).

Probably it would in fact make sense to either allow cells per tracking rule, or to allow each user to store multiple areas (which are defined by a list cells) and have those linked to tracking rules.
The reason is simply, that one would probably take longer ways to get some super rare pokemon (and thus one needs a different area).

Cheers.

Bug : Truncated encounter_id in logs

All encounter_id in logs are currently being truncated/rounded, probably due to a wrong data type :

e.g.:

{"encounter_id":8427357231974403000,"pokemon_id":261,"spawnpoint_id":4931631954051,

I checked in MAD tables and actual encounter_id is 8427357231974403189, not 8427357231974403000

MariaDB [mad]> select encounter_id from pokemon where encounter_id like '84273572319744%';
+---------------------+
| encounter_id        |
+---------------------+
| 8427357231974403189 |
+---------------------+
1 row in set (0.041 sec)

Feature : Rework Logs

Current Behavior

Poracle is currently logging a lot of information, but most of the time information logged is completely useless to real troubleshooting. It should log less stuff, but more useful stuff.

Some examples :

{"message":"Wild encounter 7079506970964088000 was sent again too soon, ignoring","level":"debug","timestamp":"2020-12-07T16:27:14.769Z"}
{"message":"Wild encounter 7079506970964088000 was sent again too soon, ignoring","level":"debug","timestamp":"2020-12-07T16:30:36.674Z"}

no idea what was sent again too soon means and how this could be useful to any troubleshooting. Should be sent only to a debug log when debug is activated in config.

This is a very big amount of messages :

grep -c "was sent again too soon" debugLog*
debugLog1.json:116787
debugLog.json:79099

Console log is currently useless as it doesn't give any information which would let an admin troubleshoot an issue, typically :

Hoothoot appeared and 0 humans cared

This log line should at least contain a timestamp + encounter_id so it can be tracked down to something.

On the opposite, it would be very useful to have a message log (which option to enable/disable it). Ideally a different one for discord and telegram, which would log the whole message sent :

{"message":"Telegram sending message {\"content\":\"***Un Raid 6 contre Blizzaroi Mega à démarré !!!***\\nArène : Calvaire, Aische \\nSe termine à: 16:22:50 \\n\\nAttaque Rapide: Tranch’Herbe 🌿 \\nAttaque Chargée: Éco-Sphère 🌿 \\n \\n\",\"sticker\":\"https://mydomain.com/telegram/monsters/460_935.webp\",\"location\":true,\"webpage_preview\":false} / connection to bbdoc 9999999999","level":"warn","timestamp":"2021-01-09T14:36:10.782Z"}

Other remarks :

  • Debug log should be configurable and disabled by default.
  • Webhook log should be configurable (and probably also disabled by default).
  • A discord.json log would be very useful. It should contain a line per message sent to discord with at least timestamp + encounter_id + discord_id so that an admin can track down a message received or not by a user.

Feature Request: Config option to Force Distance Paramater in trackings.

In my setup, I don't use "areas" at all, and would like all !track commands to be required to have a distance 'd' paramater or get rejected.

A simple 'Require_Distance' config variable or similar where no areas are in use would be nice.

(There may be other benefits to not executing area checks in performance where they are not required.)

Error Location Command: returns nothing to user using invalid !location command.

Using SwiftTileServer as my provider, occasionally I get errors like these when "what I assume is" Swift"TileServer can't reverse geocode the address when using !location. PoracleJS throws an error:

error: location command $location 275 High School Rd NE Ste C-4, Bainbridge Island, WA 98110 unhappy:Cannot read property 'latitude' of undefined {"stack":"TypeError: Cannot read property 'latitude' of undefined\n at Object.exports.run (/home/ubuntu/PoracleJS/src/lib/discord/commando/commands/location.js:39:68)"}

and returns nothing to the user. My command stroke is $, btw.

Expected Behavior

Return X reaction or something to the user showing location errored.
Additionally, maybe there's something I'm missing in the tileset, considering 80% of addresses work. Not sure where the tileserver logs are or how to access them within docker, would need help with that.
Also additionally, maybe be able to look at the return of Swifttileserver's error as a user or in poracle logs.

Current Behavior

Currently, errored addresses return nothing to the user.

Possible Solution

Steps to Reproduce (for bugs)

  1. Download SwiftTileServer
  2. Map of Washington State, USA
  3. in Discord to RocketAlert, $location 275 High School Rd NE Ste C-4, Bainbridge Island, WA 98110

Context

Users think RocketAlert is down because no user feedback of error.

Your Environment

  • Version used: PoracleJS Develop (#123)
  • Environment name and version (e.g. npm 5.6.0, nodejs v7.4.0):
  • Operating System Ubuntu 18.04.4 LTS Linux 4.15.0-112-generic x86_64

!help command not working

Expected Behavior

should show help page

Current Behavior

{"level":"error","message":"help command unhappy:fields.flat is not a function","stack":"TypeError: fields.flat is not a function\n at Function.normalizeFields (/home/user/PoracleJS/node_modules/discord.js/src/structures/MessageEmbed.js:450:8)\n at MessageEmbed.setup (/home/user/PoracleJS/node_modules/discord.js/src/structures/MessageEmbed.js:78:91)\n at new MessageEmbed (/home/user/PoracleJS/node_modules/discord.js/src/structures/MessageEmbed.js:18:10)\n at embedLikes.map.e (/home/user/PoracleJS/node_modules/discord.js/src/structures/APIMessage.js:166:40)\n at Array.map ()\n at APIMessage.resolveData (/home/user/PoracleJS/node_modules/discord.js/src/structures/APIMessage.js:166:31)\n at DMChannel.send (/home/user/PoracleJS/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:166:62)\n at Message.reply (/home/user/PoracleJS/node_modules/discord.js/src/structures/Message.js:602:25)\n at Object.exports.run (/home/user/PoracleJS/src/lib/discord/commando/commands/help.js:38:13)\n at process._tickCallback (internal/process/next_tick.js:68:7)","timestamp":"2020-12-03T14:41:59.692Z"}

Steps to Reproduce (for bugs)

  1. run !help on latest develop branch

Context

Your Environment

  • Version used: 4
  • Environment name and version (e.g. npm 5.6.0, nodejs v7.4.0): node 12.20
  • Operating System Ubuntu

Feature Requests : Stats

Please add minimal stats to Poracle, mainly to allow followin-up on the number of messages sent per channel/user and total messages sent to Telegram/Discord.

A very easy and flexible way would be to add a stats table and log all messages sent to it with Datetime, ID, type.

Another way would be to add an horodated messages.log file.

Content of the message is not really needed for stats but additional info could help for troubleshooting purpose (typically the encounter_id).

Users can track too large of a distance

If a user tracks a distance longer integer than 11 digits, it's unable to store it

Expected Behavior

it being able to track it

Current Behavior

misleading checkmark reaction but no tracking added

Possible Solution

trim dat string

Steps to Reproduce (for bugs)

  1. !track pikachu d99999999999999999999999999

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. npm 5.6.0, nodejs v7.4.0):
  • Operating System

Issue with Level5 Eggs

There is an issue with notifications Level5 eggs for Discord users and channels.

Expected Behavior

Channel/User setup with "area add " and then "!egg level5". Expected to receive notifications when level5 raid egg in to the channel or via direct message.

Current Behavior

Admin users are able to setup notifications "!egg level5" and then turn off/on and it continues to work.
Any users/channels that are non-admin that add the area and then "!egg level5" do not receive any notifications. Level 1-4 eggs and raids work without issue for all users.
Users/Channels are in the database correctly and show the same as the admin user so no apparent reason for this happening.

Your Environment

Running MariaDB:10.3 as poracledb and lastest master branch of PoracleJS.
Notifications to Discord with Discord Bot.

Configuration option to disable new 'everything' behaviour

Provide a new behaviour configuration section for this and future optional behaviour. In the !track command treat it as though the 'individually' flag is set always if this behaviour is enabled. Treat no entry in the config as off, and update the default config file to include the new section.

Track lures

Should be an ability to alert on lures

!lure everything
!lure glacial
!lure mossy
!lure magnetic
!lure standard

Would need to support distance and areas
Anything else...?

Option to specify custom StaticMap and Nominatim Server

Expected Behavior

Option to add custom StaticMap and Nominatim Servers instead of relying on the Poracle World one.

Current Behavior

StaticMap could theoretically be set in DTS but setting it globaly in the config is easier

Context

I will implement this feature request myself once i got some time (probably later today)

Develop does not check user roles

Develop branch is not cheching user roles before sending private message to users.
Removing role keeps users full control of Poracle bot.

Tested on latest develop, with 3 different users and 2 independent bots assigned to 2 diferent Discord servers

Feature: Park User

Admin able should be able to !park a user.

At the moment the only way to disable access to a user is to !unregister the user. But unregistering removes all info linked to that user in all DB tables, meaning that if user gets access to Poracle again next time, he needs to reconfigure all their alarms.

It should be possible to temp disable a user without losing all tracking info so he can get back with the same tracking when enabled again.

Double role notifications

Expected Behavior

when running the command !track pikachu @ROLE only one role should appear when the alert comes out

Current Behavior

the role is doubled when an alert comes out

Possible Solution

not sure

Steps to Reproduce (for bugs)

  1. create an alert with a role in the command
  2. wait for alert .......
  3. Profit

Context

Your Environment

  • Version used: 4
  • Operating System Ubuntu 18.10

Use Discord's CDN to host Static Maps on

When using a self-hosted Tileserver, it might be a little slow for users to load the images in embeds. Especially when looking at older messages where the Static Maps aren't cached anymore.

Additionally, it's better to avoid sharing the Tileserver URL with others, since anyone could use it to generate their own tiles / Static Maps (though this shouldn't be too big of a problem for most users)

Since Poracle is a Discord bot, a good solution to these problems is to host Static Maps on Discord's CDN.

It could work as follows:

  - Have a config option like "host_channel_id"
  - If that option is empty, just continue like we're used to
  - If using tileserver and the option is filled:
    - Fetch the Discord channel using the ID
    - Make a POST request to tileserver.com/staticmap/template using the proper data
    - This will return the map image in bytes. Convert this reponse to an image format discord.js accepts
    - Send a message to the channel with the image in its attachments
    - Read the attachments of the message and use its URL as the {{{staticmap}}} DTS option

Feature : Per-User language settings

Expected Behavior

Locale settings should be user-based instead of being set for the whole instance.

Current Behavior

language is currently defined at the global level, so only way to allow for multiple language is to launch 2 instances, maintain 2 DBs and have 2 different Bots.

    "locale": {
        "timeformat": "en-gb",
        "time": "LTS",
        "addressFormat": "{{ streetName}} {{ streetNumber }}:",
        "language": "en"
    },

Possible Solution

Moving language settings at the user level (so in humans table) would allow to run only one DB and for each user to chose their own preference.

v4 egg notification

Expected Behavior

Current Behavior

egg notication is incorrect:
Channel level 5: will get all egg levels notified
Channel level 1-4: will get no egg notifications
Channel level5 (webhook based): will get no egg notification

+-----------------------------------------------------------------------------------------------------------------------------+------+-------+-----------+----------+----------+------+-------+
| id                                                                                                                          | ping | clean | exclusive | template | distance | team | level |
+-----------------------------------------------------------------------------------------------------------------------------+------+-------+-----------+----------+----------+------+-------+
| 672571841751154719                                                                                                          | ""   |     0 |         0 |        1 |        0 |    4 |     5 |
| 673242377632350228                                                                                                          | ""   |     0 |         0 |        1 |        0 |    4 |     1 |
| 673242377632350228                                                                                                          | ""   |     0 |         0 |        1 |        0 |    4 |     2 |
| 673242377632350228                                                                                                          | ""   |     0 |         0 |        1 |        0 |    4 |     3 |
| 673242377632350228                                                                                                          | ""   |     0 |         0 |        1 |        0 |    4 |     4 |
| https://discordapp.com/api/webhooks/yyyyyyyyyyyyyyyyyy/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ""   |     0 |         0 |        1 |        0 |    4 |     5 |

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. npm 5.6.0, nodejs v7.4.0):
  • Operating System

Tracked invasions does not show distance.

Title says it all.
If you use -tracked and look at what invasions you have set, a distance is not shown.

Expected Behavior

Show you the distance that you have set in the output of command.

Current Behavior

When -tracked is used, it does not show you the distance.
only Gender: and Grunt type:

Possible Solution

Bug people who know things.

Steps to Reproduce (for bugs)

-tracked

Context

Good question.

Your Environment

Not relevant i'm sure.

Add UID to Poracle Tables

Would it be possible to add a UID column (auto-incrementing) in all those Poracle tables :

egg   
invasion 
monsters          
quest
raid 
weather

I think this would help inserting/updating records without having to rely on passing all fields into a WHERE clause.

how to upgrade monsters.json and locale/*

Hey.

I've just wanted to do the same what I did for V3 in #252 and #253, i.e. add missing Pokémon and forms and correct typos.

Now first... comparing the pkm names in monsters.json with the list of current official English names:
list.en.txt

gives a number of unexpected differences (e.g. use:
meld <( grep '^ "name": "' monsters.json | sed 's/^ "name": "//; s/",$//' | uniq ) list.en.txt
).

Including:

  • Nidoran female vs Nidoran♀
  • Nidoran male vs ``
  • `` vs Nidoran♂
  • There's a Nidoran which maps to the same ID than Nidoran male
  • Farfetchd vs Farfetch’d
  • Mr mime vs Mr. Mime
  • Ho oh vs Ho-Oh
  • Mime jr vs Mime Jr.
  • Porygon z vs Porygon-Z
  • Hoopa hoopa vs Hoopa
  • Type: null vs Type: Null
  • Tapu koko vs Tapu Koko
  • Tapu lele vs Tapu Lele
  • Tapu bulu vs Tapu Bulu
  • Tapu fini vs Tapu Fini
  • everything beyond Melmetal is missing

Does it even work to have spaces in the names?

I'd like to add the missing stuff did you generated this data from the JSON? Is there some automatic generator or was it done all by hand?

Cheers,
Chris.

Feature Request: Area Role Manager

When a user adds/removes an area have the option to automatically add/remove a corresponding role. Would help clean up the channel list for people if you have a lot of areas.

Guide to configure local.json file

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"
    }
}

New installation without geofence gives unclear error

error: Can't seem to handle monster: Cannot read property 'toLowerCase' of undefined {"stack":"TypeError: Cannot read property 'toLowerCase' of undefined\n at /root/PoracleJS/src/controllers/controller.js:134:59\n at Array.map (<anonymous>)\n at Monster.pointInArea (/root/PoracleJS/src/controllers/controller.js:134:35)\n at Monster.handle

What the hell does that mean to anyone anyway? :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.