Skip to content

Commit 928e9ff

Browse files
committed
initial
0 parents  commit 928e9ff

197 files changed

Lines changed: 68947 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.jar
15+
*.war
16+
*.nar
17+
*.ear
18+
*.zip
19+
*.tar.gz
20+
*.rar
21+
22+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23+
hs_err_pid*
24+
25+
config/config.ini.ex
26+
config/*ini
27+
config/*.json
28+
filters/*.json
29+
feeds/*.txt
30+
node_modules
31+
*.DS_Store
32+
filters/*.DS_Store
33+
ingress_scraper/*.ini
34+
embeds/*.js
35+
geofences/*.DS_Store
36+
static/images/pokemon_tiles/*.png
37+
static/images/pokemon_tiles/*.jpg
38+
static/images/raid_tiles/*.png
39+
static/images/raid_tiles/*.jpg
40+
static/images/quest_tiles/*.png
41+
static/images/quest_tiles/*.jpg
42+
geofences/*.json
43+
static/*.DS_Store
44+
modules/*.DS_Store
45+
oauth2-stripe/*.js
46+
oauth2-stripe/templates
47+
config/*.js
48+
Pokebot.js
49+
*.conf

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:11
2+
3+
WORKDIR /usr/src/app
4+
COPY package*.json ./
5+
RUN npm install
6+
7+
COPY wdr.js wdr.js
8+
COPY modules/ modules/
9+
10+
CMD [ "wdr.js" ]

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<!-- define variables -->
2+
[1.1]: http://i.imgur.com/M4fJ65n.png (ATTENTION)
3+
4+
# Webhook Data Receiver
5+
6+
![alt text][1.1] <strong><em>`The contents of this repo are a proof of concept and are for educational use only, all copyrights belong to their respective owners.`</em></strong>![alt text][1.1]<br/>
7+
8+
## This bot requires intermediate knowledge of discord and bots. You will need a minimun of TWO bot tokens, one for channels and one for subscriptions. This is **not** for a beginner user. You will not receive beginner level support for this.
9+
10+
# Installation:
11+
## 1: `git clone https://gitlab.com/webhookdatareceiver/Webhook-Data-Receiver.git/` to desired location or download the zip and unzip.
12+
13+
## 2: cd to the new WebhookDataReceiver folder
14+
15+
## 3: Type `node -v` in your terminal to determine if node is installed on your machine.
16+
- If not or version is less than 10.14, upate or download node.js from here: https://nodejs.org/en/
17+
- Type `node -v` again in your terminal post install to confirm installation.
18+
19+
## 4: Install npm package requirements.
20+
- Run `npm install` in your cloned directory.
21+
22+
## 5: Edit the Config files and save them without the `.example` on them.
23+
- Emotes.ini
24+
You will need to join emoji servers, or add the emoji to your own server:
25+
https://discord.gg/zqVCfPy - WEATHER, TEAMS, GYMS, TYPES
26+
https://discord.gg/AnECN8U - Legendary boss emojis
27+
- Discords.json
28+
- You need to add each Discord you plan on serving. WebhookDataReceiver is multi-discord capable. The geofence should encompass the whole area that the discord covers. Must be in geojson format.
29+
- Geojson.json
30+
- Geofences of areas to label your pokemon/raid/quest posts with and for users to subscribe to alerts with.
31+
- Go to http://geojson.io/ and draw your geofences. You MUST add a "name" field to each geofence. If you want to use sub areas (smaller detailed geofences within larger geofences), you must add a sub_area field and then true or false as the value. All geofences must be in geojson format.
32+
- config.ini
33+
- All directions for this files are contianed within this file.
34+
- Make sure to create bot tokens (2 min) at https://discordapp.com/developers/applications/
35+
- Grant Permissions and invite bots to all servers you will be running on. (Bot needs administrator privileges) https://finitereality.github.io/permissions-calculator/?v=0
36+
37+
## 6: Channels
38+
- Fill out each channels.ini file with the channels, chosen filter, and areas. If you do not want to filter by area, use the name that you gave your discord in discords.json.
39+
- channels_pokemon.ini
40+
- channels_raids.ini
41+
- channels_quests.ini
42+
- channels_lures.ini
43+
- channels_invasion.ini
44+
45+
## 7: Filters
46+
In /filters you will find examples of spawns, quest, and raid feeds. These files can be named whatever you want, there is no more name requirement. These are spawn filters based on PA type, also with a min_iv and max_iv override. If you do not include a Channel_ID, the bot will ignore the filter.
47+
48+
#### Quests
49+
- The "Type" field must be "quest".
50+
- Quest feeds can be filtered by reward and/or encounter. Add each reward our encounter to the "Rewards" array.
51+
- They are case sensitive, so please see examples. Refer to /static/en.json for all rewards.
52+
53+
#### Raids
54+
- The "Type field must be "raid".
55+
- Raids can be filtered by type, levels, and ex eligibility.
56+
- If you DO NOT want to filter by Ex Eligibility, REMOVE the "Ex_Eligible" field completely from the filter.
57+
- You can add as many or as few levels to the filter as you with 1-5 as the examples show.
58+
- The "Egg_Or_Boss" field must be set to either "boss" or "egg".
59+
60+
#### Spawns
61+
- This WebhookDataReceiver uses PA type filters with some overrides in the config.
62+
- The "Type" field must be "monster".
63+
- You must set the min_iv and max_iv for the filter. Defaults `0` and `100`.
64+
- You must set the min_level and max_level for the filter. Defaults `0` and `35`.
65+
- More specific IVs can be set for each monster (replace `True`/`False` with `{"min_iv":"80"}`), but that value must be within the min_iv and max_iv you set.
66+
- You can set the bot to post without IVs using the "Post_Without_IV" field. Set this to `true` or `false`.
67+
68+
## 8: Start the bot. `pm2 start wdr.js`
69+
- If you get errors that are not because of missing configs, Contact me via discord.
70+
- PM2 Docs http://pm2.keymetrics.io/docs/usage/cluster-mode/
71+
72+
## Subscriptions
73+
74+
- Subscription commands can only be used in the command channel set in the discords.json.
75+
- Type `.help` (or whatever prefix you set) for command instructions.
76+
- Rewards that users can subscribe to are set in `quest_config.json` in the configs folder. These are case sensitive and the Encounter rewards must state "Encounter" after the monster name just as the example shows.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; EXAMPLE:
2+
; [CHANNEL ID]
3+
; geofences = geofence name,geofence name,geofence name
4+
; filter = filtername.json
5+
6+
; "geofences" can either be an area name set in your geofences.json
7+
; OR the name of a discord in discords.ini or a mix of both.
8+
; Separate geofence names with a comma.
9+
; "filter" must be the file name of the filter you with to use for that channel.
10+
11+
[511303614032248843]
12+
geofences = Tallahassee
13+
filter = Invasion.json
14+
embed = invasion.js
15+
; roleid = 530525516290326529

config/channels_lure.ini.example

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; EXAMPLE:
2+
; [CHANNEL ID]
3+
; geofences = geofence name,geofence name,geofence name
4+
; filter = filtername.json
5+
6+
; "geofences" can either be an area name set in your geofences.json
7+
; OR the name of a discord in discords.ini or a mix of both.
8+
; Separate geofence names with a comma.
9+
; "filter" must be the file name of the filter you with to use for that channel.
10+
11+
[511303614032248843]
12+
geofences = Tallahassee
13+
filter = Lure.json
14+
embed = lure.js
15+
; roleid = 530525516290326529
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
; EXAMPLE:
2+
; [CHANNEL ID]
3+
; geofences = geofence name,geofence name,geofence name
4+
; filter = filtername.json
5+
6+
; "geofences" can either be an area name set in your geofences.json
7+
; OR the name of a discord in discords.ini or a mix of both.
8+
; Separate geofence names with a comma.
9+
; "filter" must be the file name of the filter you with to use for that channel.
10+
11+
[507626057277505552]
12+
geofences = Tallahassee
13+
filter = Pokemon_100.json
14+
embed = pokemon_iv.js
15+
roleid = 530525516290326529
16+
17+
[520598637009436672]
18+
geofences = Gainesville
19+
embed = pokemon.js
20+
filter = Pokemon_Candy.json
21+
22+
[523329993988898816]
23+
geofences = Tallahassee
24+
filter = Pokemon_90-99.json
25+
26+
[507626170380976130]
27+
geofences = Tallahassee
28+
filter = Pokemon_80-89.json
29+
30+
[507626243378905108]
31+
geofences = Tallahassee
32+
filter = Pokemon_0.json
33+
34+
[515519653204721665]
35+
geofences = Tallahassee
36+
filter = Pokemon_Max_Level.json
37+
38+
[482619507530268683]
39+
geofences = Tallahassee
40+
filter = Pokemon_Uber.json
41+
42+
[507600060708683777]
43+
geofences = Tallahassee
44+
filter = Pokemon_Candy.json
45+
46+
[520598528515506219]
47+
geofences = Gainesville
48+
filter = Pokemon_100.json
49+
50+
[523343972282794006]
51+
geofences = Gainesville
52+
filter = Pokemon_90-99.json
53+
54+
[520598556990504970]
55+
geofences = Gainesville
56+
filter = Pokemon_80-89.json
57+
58+
[520598581493760001]
59+
geofences = Gainesville
60+
filter = Pokemon_0.json
61+
62+
[520625838417379348]
63+
geofences = Gainesville
64+
filter = Pokemon_Max_Level.json
65+
66+
[520598612024098860]
67+
geofences = Gainesville
68+
filter = Pokemon_Uber.json

config/channels_quests.ini.example

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
; EXAMPLE:
2+
; [CHANNEL ID]
3+
; geofences = geofence name,geofence name,geofence name
4+
; filter = filtername.json
5+
6+
; "geofences" can either be an area name set in your geofences.json
7+
; OR the name of a discord in discords.ini or a mix of both.
8+
; Separate geofence names with a comma.
9+
; "filter" must be the file name of the filter you with to use for that channel.
10+
11+
[511303614032248843]
12+
geofences = Tallahassee
13+
filter = Quest_Encounters.json
14+
embed = quests.js
15+
roleid = 530525516290326529
16+
17+
[511701871304638505]
18+
geofences = Tallahassee
19+
filter = Quest_Items.json
20+
21+
[520598795164319745]
22+
geofences = Gainesville
23+
filter = Quest_Encounters.json
24+
25+
[520598686133125121]
26+
geofences = Gainesville
27+
filter = Quest_Items.json

config/channels_raids.ini.example

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
; EXAMPLE:
2+
; [CHANNEL ID]
3+
; geofences = geofence name,geofence name,geofence name
4+
; filter = filtername.json
5+
6+
; "geofences" can either be an area name set in your geofences.json
7+
; OR the name of a discord in discords.ini or a mix of both.
8+
; Separate geofence names with a comma.
9+
; "filter" must be the file name of the filter you with to use for that channel.
10+
11+
[458789990017662986]
12+
geofences = Tallahassee
13+
filter = Raids_Level5.json
14+
embed = raids.js
15+
embed_egg = raid_eggs.js
16+
roleid = 530525516290326529
17+
18+
[458790935908843520]
19+
geofences = Tallahassee
20+
embed_egg = raid_eggs.js
21+
filter = Raids_Level5_Egg.json
22+
23+
[458791546959953920]
24+
geofences = Tallahassee
25+
filter = Raids_Ex_Eligible.json
26+
27+
[458791583291146250]
28+
geofences = Tallahassee
29+
filter = Raids_Ex_Eligible_Egg.json
30+
31+
[458790613811462144]
32+
geofences = Tallahassee
33+
filter = Raids_Level3&4.json
34+
35+
[458789953602584599]
36+
geofences = Tallahassee
37+
filter = Raids_Level3&4_Egg.json
38+
39+
[458790531301113857]
40+
geofences = Tallahassee
41+
filter = Raids_Level1&2.json
42+
43+
[458790438103416834]
44+
geofences = Tallahassee
45+
filter = Raids_Level1&2_Egg.json
46+
47+
[520598988874055681]
48+
geofences = Gainesville
49+
filter = Raids_Level5.json
50+
51+
[520599013972639754]
52+
geofences = Gainesville
53+
filter = Raids_Level5_Egg.json
54+
55+
[520599047388659723]
56+
geofences = Gainesville
57+
filter = Raids_Ex_Eligible.json
58+
59+
[520599077675597825]
60+
geofences = Gainesville
61+
filter = Raids_Ex_Eligible_Egg.json
62+
63+
[520599208101806100]
64+
geofences = Gainesville
65+
filter = Raids_Level3&4.json
66+
67+
[520599251638550528]
68+
geofences = Gainesville
69+
filter = Raids_Level3&4_Egg.json
70+
71+
[520599298195324930]
72+
geofences = Gainesville
73+
filter = Raids_Level1&2.json
74+
75+
[520599329527037952]
76+
geofences = Gainesville
77+
filter = Raids_Level1&2_Egg.json
78+
79+
[528910360556863492]
80+
geofences = Central
81+
filter = Raids_Level5.json

0 commit comments

Comments
 (0)