├── .eslintrc.js ├── .github ├── FUNDING.yml └── workflows │ ├── lint.yml │ └── node.js.yml ├── .gitignore ├── .vscode └── launch.json ├── README.md ├── configs ├── choices.json.example ├── config.ini.example ├── discords │ └── city.json.example ├── embeds │ ├── help-CommandChannel.js.example │ ├── help.js.example │ ├── invasion.js.example │ ├── lure.js.example │ ├── nests.js.example │ ├── pokemon.js.example │ ├── pokemon_free.js.example │ ├── pokemon_iv.js.example │ ├── pvp.js.example │ ├── quests.js.example │ ├── raid_boss.js.example │ ├── raid_egg.js.example │ ├── raid_eggs.js.example │ └── raids.js.example ├── filters │ ├── Invasion.json.example │ ├── Lure.json.example │ ├── Pokemon_0.json.example │ ├── Pokemon_100.json.ex │ ├── Pokemon_100_Level_1.json.ex │ ├── Pokemon_100_Max_Level.json.ex │ ├── Pokemon_90-99.json.ex │ ├── Pokemon_ALL.json.example │ ├── Pokemon_Advanced.json.example │ ├── Pokemon_BigKarp.json.example │ ├── Pokemon_Candy.json.example │ ├── Pokemon_Ditto.json.example │ ├── Pokemon_Free.json.example │ ├── Pokemon_Level_1.json.example │ ├── Pokemon_Mega_Rare.json.example │ ├── Pokemon_TinyRat.json.example │ ├── Pokemon_Uber.json.example │ ├── PvP_Perfect_Grass_Ultra.json.ex │ ├── PvP_Perfect_Grass_Ultra.json.example │ ├── PvP_Perfect_Great.json.ex │ ├── PvP_Perfect_Great.json.example │ ├── PvP_Perfect_Ultra.json.ex │ ├── PvP_Perfect_Ultra.json.example │ ├── Quest_Encounters.json.example │ ├── Quest_Items.json.example │ ├── Raids_Ex_Eligible.json.example │ ├── Raids_Ex_Eligible_Egg.json.example │ ├── Raids_Level1&2.json.example │ ├── Raids_Level1&2_Egg.json.example │ ├── Raids_Level3&4.json.example │ ├── Raids_Level3&4_Egg.json.example │ ├── Raids_Level5.json.example │ ├── Raids_Level5_Egg.json.example │ ├── Raids_Level6.json.example │ └── Raids_Level6_Egg.json.example ├── geofences │ ├── #city.json.example │ └── city.json.example ├── invasion_channels │ ├── #city.ini.example │ └── city.ini.example ├── lure_channels │ ├── #city.ini.example │ └── city.ini.example ├── pokemon_channels │ └── #city.ini.example ├── pvp_channels │ └── #city.ini.example ├── quest_channels │ ├── #city.ini.example │ └── city.ini.example ├── raid_channels │ ├── #city.ini.example │ └── city.ini.example ├── sub_presets │ ├── pokemon │ │ ├── All_100%.ini.example │ │ ├── All_Gible.ini.example │ │ └── All_Unown.ini.example │ └── pvp │ │ ├── All_Great_Rank_1s.ini.example │ │ ├── All_Rank_1s.ini.example │ │ ├── All_Ultra_Rank_1s.ini.example │ │ ├── Gen5_Rank_1s.ini.example │ │ └── Grass_Rank_1s.ini.example └── z_maptiles │ ├── Flo-Templates │ ├── invasions.json │ ├── location.json │ ├── lures.json │ ├── nest.json │ ├── pokemon-sat.json │ ├── pokemon.json │ ├── quests.json │ └── raids.json │ ├── TileServer │ ├── config.json │ └── styles │ │ ├── dark-matter │ │ ├── icons │ │ │ ├── circle-11.svg │ │ │ ├── star-11.svg │ │ │ └── wood-pattern.svg │ │ ├── sprite.json │ │ ├── sprite.png │ │ ├── sprite@2x.json │ │ ├── sprite@2x.png │ │ └── style.json │ │ ├── klokantech-basic │ │ ├── icons │ │ │ ├── circle-11.svg │ │ │ ├── star-11.svg │ │ │ └── wood-pattern.svg │ │ ├── sprite.json │ │ ├── sprite.png │ │ ├── sprite@2x.json │ │ ├── sprite@2x.png │ │ └── style.json │ │ ├── osm-bright │ │ ├── icons │ │ │ ├── circle-11.svg │ │ │ ├── star-11.svg │ │ │ └── wood-pattern.svg │ │ ├── sprite.json │ │ ├── sprite.png │ │ ├── sprite@2x.json │ │ ├── sprite@2x.png │ │ └── style.json │ │ ├── pogo-daytime │ │ ├── icons │ │ │ ├── circle-11.svg │ │ │ ├── star-11.svg │ │ │ └── wood-pattern.svg │ │ ├── sprite.json │ │ ├── sprite.png │ │ ├── sprite@2x.json │ │ ├── sprite@2x.png │ │ └── style.json │ │ ├── pogo-nitetime │ │ ├── icons │ │ │ ├── circle-11.svg │ │ │ ├── star-11.svg │ │ │ └── wood-pattern.svg │ │ ├── sprite.json │ │ ├── sprite.png │ │ ├── sprite@2x.json │ │ ├── sprite@2x.png │ │ └── style.json │ │ └── positron │ │ ├── icons │ │ ├── circle-11.svg │ │ ├── star-11.svg │ │ └── wood-pattern.svg │ │ ├── sprite.json │ │ ├── sprite.png │ │ ├── sprite@2x.json │ │ ├── sprite@2x.png │ │ └── style.json │ └── Versx-Templates │ ├── location.json │ ├── nest.json │ ├── pokemon.json │ ├── quests.json │ ├── raids.json │ ├── staticmap-complex.example.json │ └── test.json ├── package-lock.json ├── package.json ├── src ├── bot.js ├── commands │ ├── admin │ │ ├── filter.js │ │ └── role.js │ ├── command-admin.js │ ├── command-channel.js │ ├── command-dm.js │ ├── command-public.js │ ├── public │ │ └── events.js │ └── subscription │ │ ├── area │ │ ├── add.js │ │ ├── begin.js │ │ ├── collect_detail.js │ │ ├── collect_option.js │ │ ├── remove.js │ │ └── view.js │ │ ├── cancel.js │ │ ├── help.js │ │ ├── location │ │ ├── begin.js │ │ ├── collect_detail.js │ │ ├── collect_option.js │ │ ├── create.js │ │ ├── lset.js │ │ ├── modify.js │ │ ├── preset.js │ │ ├── remove.js │ │ ├── set.js │ │ └── view.js │ │ ├── lset.js │ │ ├── pause.js │ │ ├── pokemon │ │ ├── begin.js │ │ ├── collect_detail.js │ │ ├── collect_option.js │ │ ├── create.js │ │ ├── modify.js │ │ ├── preset.js │ │ ├── remove.js │ │ ├── status.js │ │ └── view.js │ │ ├── pvp │ │ ├── begin.js │ │ ├── collect_detail.js │ │ ├── collect_option.js │ │ ├── create.js │ │ ├── modify.js │ │ ├── preset.js │ │ ├── remove.js │ │ ├── status.js │ │ └── view.js │ │ ├── quest │ │ ├── begin.js │ │ ├── collect_detail.js │ │ ├── collect_option.js │ │ ├── create.js │ │ ├── preset.js │ │ ├── remove.js │ │ ├── status.js │ │ └── view.js │ │ ├── raid │ │ ├── begin.js │ │ ├── collect_detail.js │ │ ├── collect_match.js │ │ ├── collect_option.js │ │ ├── create.js │ │ ├── preset.js │ │ ├── remove.js │ │ ├── status.js │ │ └── view.js │ │ ├── resume.js │ │ └── timedout.js ├── database.js ├── emojis.js ├── events │ ├── channelCreate.js │ ├── channelDelete.js │ ├── channelUpdate.js │ ├── guildMemberAdd.js │ ├── guildMemberRemove.js │ ├── guildMemberUpdate.js │ ├── memberUpdate.js │ ├── message.js │ ├── raw.js │ ├── reactions.js │ ├── roleCreate.js │ ├── roleDelete.js │ ├── roleUpdate.js │ └── userUpdate.js ├── feeds │ ├── invasion.js │ ├── lure.js │ ├── pokemon.js │ ├── pvp.js │ ├── quests.js │ └── raids.js ├── functions │ ├── Authorize.js │ ├── CalculateCP.js │ ├── Capitalize.js │ ├── Console.js │ ├── Fetch_Gyms.js │ ├── Fetch_JSON.js │ ├── Fetch_Stops.js │ ├── Generate_Master.js │ ├── Generate_Tile.js │ ├── Get_Areas.js │ ├── Get_Distance.js │ ├── Get_Gen.js │ ├── Get_Gender.js │ ├── Get_Locale.js │ ├── Get_Lure.js │ ├── Get_Quest_Reward.js │ ├── Get_Quest_Task.js │ ├── Get_Size.js │ ├── Get_Sprite.js │ ├── Get_Type_Color.js │ ├── Get_Typing.js │ ├── Get_Weather.js │ ├── Pokemon_ID_Search.js │ ├── Rate_Limit.js │ ├── Save_User.js │ ├── Send_DM.js │ └── Send_Embed.js ├── handlers │ ├── messages.js │ └── webhooks.js ├── startup │ ├── load_data.js │ ├── load_discords.js │ ├── load_feeds.js │ ├── load_filters.js │ ├── load_functions.js │ ├── load_geofences.js │ ├── load_modules.js │ ├── load_ontime.js │ └── load_presets.js └── subscriptions │ ├── invasion.js │ ├── lure.js │ ├── pokemon.js │ ├── pvp.js │ ├── quests.js │ └── raids.js ├── static ├── data │ ├── cp_multiplier.json │ ├── master.json │ ├── pokemonId.json │ ├── rawprotos.proto │ ├── type_effectiveness.json │ └── updates.json ├── dbMigrate1.js.example ├── dbMigrate2.js.example ├── files │ ├── PvPRank.js.example │ ├── database_tables.txt │ ├── grafana_tables.txt │ ├── nginx │ │ └── botimages.conf.example │ ├── payloads.json │ └── snark.json ├── schemas │ ├── info.txt │ ├── pokedex.txt │ ├── pokemon__subs.txt │ ├── pvp_subs.txt │ ├── quest_queue.txt │ ├── quest_subs.txt │ ├── raid_subs.txt │ └── users.txt └── type_effectiveness.json └── wdr.js /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'env': { 3 | 'commonjs': true, 4 | 'es6': true, 5 | 'node': true 6 | }, 7 | 'extends': 'eslint:recommended', 8 | 'globals': { 9 | 'Atomics': 'readonly', 10 | 'SharedArrayBuffer': 'readonly' 11 | }, 12 | 'parserOptions': { 13 | 'ecmaVersion': 2018 14 | }, 15 | 'rules': { 16 | 'indent': [ 17 | 'error', 18 | 4, 19 | { 20 | 'SwitchCase': 1 21 | } 22 | ], 23 | 'linebreak-style': 0, 24 | 'quotes': [ 25 | 'error', 26 | 'single' 27 | ], 28 | 'semi': [ 29 | 'error', 30 | 'always' 31 | ] 32 | } 33 | }; -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: PartTimeJS # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | #patreon: # Replace with a single Patreon username 5 | #custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 6 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: Install modules 15 | run: npm install 16 | - name: Run ESLint 17 | run: node_modules/eslint/bin/eslint.js src/ --ext .js,.jsx,.ts,.tsx 18 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | strategy: 16 | matrix: 17 | node-version: [12.x] 18 | 19 | steps: 20 | - uses: actions/checkout@v2 21 | - name: Use Node.js ${{ matrix.node-version }} 22 | uses: actions/setup-node@v1 23 | with: 24 | node-version: ${{ matrix.node-version }} 25 | - run: npm ci 26 | - run: npm run build --if-present 27 | # - run: npm test 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 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 | */*.ini 26 | 27 | configs/*.json 28 | */*/*.ini 29 | */*/*.nonobfuscated 30 | configs/*.json 31 | configs/discords/*.json 32 | configs/geofences/*.json 33 | configs/filters/*.json 34 | */*/*/*.ini 35 | configs/embeds/*.js 36 | configs/db/*.js 37 | #src/functions/Generate_Master.js 38 | 39 | package-lock.json 40 | 41 | */*/*/*.json 42 | */*/*.json 43 | 44 | src/static/PvPRank.js 45 | src/static/data/*ini 46 | src/static/dbMigrate.js 47 | static/*.js 48 | *.old 49 | *.DS_Store 50 | *.conf 51 | *.nonobfuscated.js 52 | config/*.ini 53 | *.obf 54 | node_modules 55 | rawprotos.json 56 | baseprotos.json 57 | *.proto 58 | master.json 59 | 60 | WDR3/configs/geofences/*.json 61 | WDR3/configs/embeds/*.js 62 | WDR3/configs/db/*.js 63 | */*/config.ini 64 | */*/*/*/*.ini 65 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | 9 | 10 | { 11 | "type": "node", 12 | "request": "launch", 13 | "name": "Launch Program", 14 | "skipFiles": [ 15 | "/**" 16 | ], 17 | "program": "${workspaceFolder}\\wdr.js" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /configs/choices.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Quest_Rewards": [ 3 | "Unova Stone", 4 | "1000 Stardust", 5 | "1500 Stardust", 6 | "Charged TM", 7 | "Fast TM", 8 | "Golden Razz Berry", 9 | "Hyper Potion", 10 | "Max Potion", 11 | "Max Revive", 12 | "Rare Candy", 13 | "Silver Pinap Berry", 14 | "Star Piece", 15 | "Ultra Ball", 16 | "Chansey", 17 | "Dratini", 18 | "Spinda" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /configs/discords/city.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "name": "City", 3 | 4 | "id": "2634534634635152", 5 | 6 | "geojson_file": "city.json", 7 | 8 | "map_url": "https://url.com/", 9 | 10 | "subscribe_url": "https://url.com/subscribe", 11 | 12 | "allowed_roles": [ 13 | "2776456456456986240", 14 | "52529456456456439360", 15 | "2669456456454564843" 16 | ], 17 | 18 | "command_channels": [ 19 | "73535745654647039", 20 | "73534564564567039", 21 | "7362744564564569436" 22 | ], 23 | 24 | "purge_channels": "ENABLED", 25 | 26 | "channels_to_purge": [ 27 | "5374564564561983371", 28 | "53746021456456456785" 29 | ], 30 | 31 | "bot_admins": [ 32 | "2342354564362465643", 33 | "2542362436243624352" 34 | ], 35 | 36 | "geofence": [ 37 | [ 38 | [-24.45853,35.46858], 39 | [-24.225474,35.305654], 40 | [-24.037088,35.483225], 41 | [-24.292963,35.640842], 42 | [-24.45853,35.46858] 43 | ] 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /configs/embeds/invasion.js.example: -------------------------------------------------------------------------------- 1 | module.exports = function(WDR, p) { 2 | 3 | /* AVAILABLE VARIABLES 4 | p.type : Type of the Grunt Invasion 5 | p.weaknesses 6 | p.resistances 7 | p.type 8 | p.color 9 | p.gender : This is blank if it is a leader 10 | p.time 11 | p.mins 12 | p.secs 13 | p.lat 14 | p.lon 15 | p.area 16 | p.map_url 17 | p.google 18 | p.apple 19 | p.waze 20 | p.pmsf 21 | p.rdm 22 | p.encounters 23 | p.battles 24 | p.first 25 | p.second 26 | p.third 27 | */ 28 | 29 | let invasion_embed = new WDR.DiscordJS.MessageEmbed() 30 | .setColor(p.color) 31 | .setThumbnail(p.sprite) 32 | .setAuthor(p.name, p.url) 33 | .setTitle("**" + p.type + " Invasion**") 34 | .setDescription("Invasion Expires: " + p.time + " (" + p.mins + " Mins)" + "\n" + 35 | " " + "\n" + 36 | p.area + " | Directions: " + "\n" + 37 | p.google + " | " + p.apple + " | " + p.waze) 38 | .setImage(p.static_map); 39 | 40 | return invasion_embed; 41 | } 42 | -------------------------------------------------------------------------------- /configs/embeds/lure.js.example: -------------------------------------------------------------------------------- 1 | module.exports = function(WDR, p) { 2 | 3 | let lure_embed = new WDR.DiscordJS.MessageEmbed() 4 | .setColor(p.color) 5 | .setThumbnail(p.sprite) 6 | .setAuthor(p.name, p.url) 7 | .setTitle("**" + p.type + " Lure**") 8 | .setDescription(p.area + " | Directions: " + "\n" + 9 | p.google + " | " + p.apple + " | " + p.waze) 10 | .setImage(p.static_map) 11 | .setFooter("Lure Expires at: " + p.time + " (" + p.mins + " Mins) "); 12 | 13 | return lure_embed; 14 | } 15 | 16 | // White space used in the default embed => " " 17 | //(Copy between the quotes. It"s not a normal space even though it looks like one.) 18 | 19 | // Other spaces: 20 | // https://www.brunildo.org/test/space-chars.html 21 | 22 | //------------------------------------------------------------------------------ 23 | // AVAILABLE VARIABLES 24 | //------------------------------------------------------------------------------ 25 | // p.color - Type Color (Hex) 26 | // p.sprite - Lure Sprite Image 27 | // p.name - Pokestop Name 28 | // p.url - URL for Pokestop image 29 | // p.area - Geofence Area of the Pokestop 30 | // p.google - Google Directions URL 31 | // p.apple - Apple Directions URL 32 | // p.waze - Waze Directions URL 33 | // p.pmsf - PMSF Map Link to the Sighting 34 | // p.rdm - RDM Map Link to the Sighting 35 | // p.static_map - Static Map Tile Image 36 | // p.time - Expire Time 37 | // p.mins - Expire Minutes 38 | -------------------------------------------------------------------------------- /configs/embeds/nests.js.example: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | module.exports = function(p) { 3 | 4 | let nest_embed = new Discord.MessageEmbed() 5 | .setColor(p.color) 6 | .setThumbnail(p.sprite) 7 | .addField('**'+p.name+'** '+p.form+' Nest\n'+p.type,'Avg Spawns: '+p.avg) 8 | .addField(p.area+' | '+p.nest_name+':',p.google+' | '+p.apple+' | '+p.pmsf, false) 9 | .setImage(p.static_map) 10 | .setFooter('Nest location updated on: '+p.time+' By: '+p.submitter); 11 | 12 | return nest_embed; 13 | } 14 | -------------------------------------------------------------------------------- /configs/embeds/pokemon.js.example: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | module.exports = function(p) { 3 | 4 | let pokemon_embed = new Discord.MessageEmbed() 5 | .setColor(p.color) 6 | .setThumbnail(p.sprite) 7 | .addField("**"+p.name+"** "+p.form+p.gender,p.verified+"| "+p.time+" (*"+p.mins+"m "+p.secs+"s*)\n"+p.type+p.weather_boost) 8 | .addField(p.area+" | Directions:",p.google+" | "+p.apple+" | "+p.pmsf, false) 9 | .setImage(p.static_map); 10 | 11 | return pokemon_embed; 12 | } 13 | -------------------------------------------------------------------------------- /configs/embeds/pokemon_free.js.example: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | module.exports = function(p) { 3 | 4 | let pokemon_embed = new Discord.MessageEmbed() 5 | .setColor(p.color) 6 | .setThumbnail(p.sprite) 7 | .setDescription('Subscribe at '+p.url) 8 | .addField('**'+p.name+'** '+p.form+p.attack+'/'+p.defense+'/'+p.stamina+' ('+p.iv+'%)\n' 9 | +'Level '+p.level+' | CP '+p.cp+p.gender, 'Ht: '+p.height+'m | Wt: '+p.weight+'kg | '+p.size+'\n' 10 | +p.move_name_1+' '+p.move_type_1+' / '+p.move_name_2+' '+p.move_type_2, false) 11 | .addField(p.verified+'| '+p.time+' (*'+p.mins+'m '+p.secs+'s*) ', p.type+p.weather_boost+'\n' 12 | +'**'+p.area+'**', false); 13 | 14 | return pokemon_embed; 15 | } 16 | -------------------------------------------------------------------------------- /configs/embeds/pokemon_iv.js.example: -------------------------------------------------------------------------------- 1 | module.exports = function(WDR, p) { 2 | 3 | // ADD YOUR CUSTOM SPACING 4 | if (p.form) { 5 | p.form = " " + p.form; 6 | } 7 | 8 | if (p.gender_wemoji) { 9 | p.gender_wemoji = " | " + p.gender_wemoji; 10 | } else { 11 | p.gender_wemoji = ""; 12 | } 13 | 14 | let Sighting_Embed = new WDR.DiscordJS.MessageEmbed() 15 | .setColor(p.color) 16 | .setThumbnail(p.sprite) 17 | .setTitle("**" + p.name + "" + p.form + "** " + p.atk + "/" + p.def + "/" + p.sta + " (" + p.iv + "%) " + p.area) 18 | .setDescription("Level " + p.lvl + " | CP " + p.cp + p.gender_wemoji + "\n" + 19 | "Ht: " + p.height + "m | Wt: " + p.weight + "kg | " + p.size + "\n" + 20 | p.move_1_name + " " + p.move_1_type + " / " + p.move_2_name + " " + p.move_2_type + "\n" + 21 | "Despawn: **" + p.time + " (" + p.mins + "m " + p.secs + "s)** " + p.verified + "\n" + 22 | p.weather_boost + " \n" + 23 | "Directions:" + "\n" + 24 | p.google + " | " + p.apple + " | " + p.waze) 25 | .setImage(p.static_map) 26 | .setFooter(p.footer); 27 | 28 | return Sighting_Embed; 29 | } 30 | 31 | // White space used in the default embed => " " 32 | //(Copy between the quotes. It's not a normal space even though it looks like one.) 33 | 34 | // Other spaces: 35 | // https://www.brunildo.org/test/space-chars.html 36 | 37 | //------------------------------------------------------------------------------ 38 | // AVAILABLE VARIABLES 39 | //------------------------------------------------------------------------------ 40 | // p.gen - Generation 41 | // p.name - Locale Name 42 | // p.form - Locale Form Name 43 | // p.id - Pokedex ID 44 | // p.sprite - Sprite Image 45 | // p.iv - Internal Value 46 | // p.cp - CP 47 | // p.gender_wemoji - Gender with Emoji 48 | // p.gender_noemoji - Gender without Emoji 49 | // p.height - Take a wild guess 50 | // p.weight - Probably cant figure this one out 51 | // p.type - Type(s) Emoji(s) 52 | // p.type_noemoji - Type(s) Wording 53 | // p.color - Type Color (Hex) 54 | // p.weather_boost - If Weather-Boosted 55 | // p.lat - GPS Latitude 56 | // p.lon - GPS Longitude 57 | // p.area - Geofence Area of the Sighting 58 | // p.move_1_name - Locale Move 1 Name 59 | // p.move_2_name - Locale Move 2 Name 60 | // p.move_1_type - Move 1 Type Emoji 61 | // p.move_2_type - Move 2 Type Emoji 62 | // p.map_url - Map URL 63 | // p.google - Google Directions URL 64 | // p.apple - Apple Directions URL 65 | // p.waze - Waze Directions URL 66 | // p.pmsf - PMSF Map Link to the Sighting 67 | // p.rdm - RDM Map Link to the Sighting 68 | // p.static_map - Static Map Tile Image 69 | // p.verified - Spawnpoint Timer Verified Emoji (Yes/No) 70 | // p.time - Despawn Time 71 | // p.mins - Despawn Minutes 72 | // p.secs - Despawn Seconds 73 | // p.atk - Attack IV 74 | // p.def - Defense IV 75 | // p.sta - Stamina IV 76 | // p.lvl - Level 77 | -------------------------------------------------------------------------------- /configs/embeds/quests.js.example: -------------------------------------------------------------------------------- 1 | module.exports = function(WDR, p) { 2 | // CREATE QUEST EMBED 3 | let quest_embed = new WDR.DiscordJS.MessageEmbed() 4 | .setColor(p.color) 5 | .setThumbnail(p.sprite) 6 | .setAuthor(p.name, p.url) 7 | .setTitle(p.reward) 8 | .setDescription("**" + p.task + "**" + "\n" + 9 | " " + "\n" + 10 | p.area + " | Directions: " + "\n" + 11 | p.google + " | " + p.apple + " | " + p.waze) 12 | .setImage(p.static_map) 13 | .setFooter("Expires: " + p.time); 14 | 15 | return quest_embed; 16 | } 17 | -------------------------------------------------------------------------------- /configs/embeds/raid_boss.js.example: -------------------------------------------------------------------------------- 1 | module.exports = function(WDR, g) { 2 | 3 | // ADD YOUR CUSTOM SPACING 4 | if (g.form != "") { 5 | g.form = " " + g.form; 6 | } 7 | if (g.sponsor != "") { 8 | g.sponsor = " | " + g.sponsor; 9 | } 10 | if (g.exraid != "") { 11 | g.exraid = " | " + g.exraid; 12 | } 13 | if (g.notes != "") { 14 | g.notes = "\n" + g.notes; 15 | } 16 | 17 | // CREATE THE RAID EMBED 18 | let raid_embed = new WDR.DiscordJS.MessageEmbed() 19 | .setColor(g.color) 20 | .setThumbnail(g.sprite) 21 | .setAuthor(g.gym, g.url) 22 | .setTitle("**" + g.boss + g.form + " Raid**") 23 | .setDescription(g.move_1_name + " " + g.move_1_type + " / " + g.move_2_name + " " + g.move_2_type + "\n" + 24 | "Raid Ends: **" + g.end_time + " (" + g.end_mins + " Mins)**" + "\n" + 25 | "Level " + g.lvl + " | " + g.team + g.sponsor + "\n" + 26 | "Counter(s): " + g.weaknesses + "\n" + 27 | g.exraid + g.notes + "\n" + 28 | "**" + g.area + "** | Directions:" + "\n" + 29 | g.google + " | " + g.apple + " | " + g.waze) 30 | .setImage(g.static_map); 31 | 32 | return raid_embed; 33 | } 34 | 35 | // White space used in the default embed => " " 36 | //(Copy between the quotes. It"s not a normal space even though it looks like one.) 37 | 38 | // Other spaces: 39 | // https://www.brunildo.org/test/space-chars.html 40 | 41 | //------------------------------------------------------------------------------ 42 | // AVAILABLE VARIABLES 43 | //------------------------------------------------------------------------------ 44 | // g.form - Locale Boss Form 45 | // g.boss - Locale Gym Boss or "Egg" 46 | // g.move_1_name - Locale Move 1 Name 47 | // g.move_2_name - Locale Move 2 Name 48 | // g.lvl - Raid Level 49 | // g.sprite: - Egg / Boss Sprite 50 | // g.url - Gym Image URL 51 | // g.gym - Gym Name 52 | // g.exraid - If the Raid is an Exclusive Raid or Not 53 | // g.type - Boss Type 54 | // g.type_noemoji - Boss Type No Emojis 55 | // g.weaknesses: - Boss Type Weaknesses 56 | // g.resistances: - Boss Type Resistances 57 | // g.lat - GPS Latitude 58 | // g.lon - GPS Longitude 59 | // g.area - Geofence Area of the Sighting 60 | // g.google - Google Directions URL 61 | // g.apple - Apple Directions URL 62 | // g.waze - Waze Directions URL, 63 | // g.pmsf - PMF Map URL for Raid 64 | // g.rdm - RDM Map URL for Raid 65 | // g.team - Team Emoji and Name of Gym Control 66 | // g.color - Raid Level Color 67 | // g.hatch_time - Hatch Time 68 | // g.end_time - End Time 69 | // g.hatch_mins - Minutes until Hatch 70 | // g.end_mins - Minutes until End 71 | // g.move_1_type - Move 1 Type Emoji 72 | // g.move_2_type - Move 2 Type Emoji 73 | // g.minCP - Minimum CP for caught Raid Boss 74 | // g.maxCP - Maximum CP for caught Raid Boss (Perfect) 75 | // g.minCP_boosted - Minimum boosted CP for caught Raid Boss 76 | // g.maxCP_boosted - Maximum boosted CP for caught Raid Boss (Perfect) 77 | // g.static_map - Static Map URL 78 | -------------------------------------------------------------------------------- /configs/embeds/raid_egg.js.example: -------------------------------------------------------------------------------- 1 | module.exports = function(WDR, g) { 2 | 3 | // ADD YOUR CUSTOM SPACING 4 | if (g.form != "") { 5 | g.form = " " + g.form; 6 | } 7 | if (g.sponsor != "") { 8 | g.sponsor = " | " + g.sponsor; 9 | } 10 | if (g.exraid != "") { 11 | g.exraid = " | " + g.exraid; 12 | } 13 | if (g.notes != "") { 14 | g.notes = "\n" + g.notes; 15 | } 16 | 17 | // CREATE THE EGG EMBED 18 | let raid_embed = new WDR.DiscordJS.MessageEmbed() 19 | .setColor(g.color) 20 | .setThumbnail(g.sprite) 21 | .setAuthor(g.gym, g.url) 22 | .setDescription("**Level " + g.lvl + "** Raid" + "\n" + 23 | g.team + g.sponsor + "\n" + 24 | "Hatches: **" + g.hatch_time + " (*" + g.hatch_mins + " Mins*)" + "**\n" + 25 | g.exraid + g.notes + "\n" + 26 | "**" + g.area + "** | Directions:" + "\n" + 27 | g.google + " - " + g.apple + " - " + g.waze) 28 | .setImage(g.static_map); 29 | 30 | return raid_embed; 31 | } 32 | 33 | 34 | //------------------------------------------------------------------------------ 35 | // AVAILABLE VARIABLES 36 | //------------------------------------------------------------------------------ 37 | // g.form - Locale Boss Form 38 | // g.boss - Locale Gym Boss or "Egg" 39 | // g.move_1_name - Locale Move 1 Name 40 | // g.move_2_name - Locale Move 2 Name 41 | // g.lvl - Raid Level 42 | // g.sprite: - Egg / Boss Sprite 43 | // g.url - Gym Image URL 44 | // g.gym - Gym Name 45 | // g.exraid - If the Raid is an Exclusive Raid or Not 46 | // g.type - Boss Type 47 | // g.type_noemoji - Boss Type No Emojis 48 | // g.weaknesses: - Boss Type Weaknesses 49 | // g.resistances: - Boss Type Resistances 50 | // g.lat - GPS Latitude 51 | // g.lon - GPS Longitude 52 | // g.area - Geofence Area of the Sighting 53 | // g.google - Google Directions URL 54 | // g.apple - Apple Directions URL 55 | // g.waze - Waze Directions URL, 56 | // g.pmsf - PMF Map URL for Raid 57 | // g.rdm - RDM Map URL for Raid 58 | // g.team - Team Emoji and Name of Gym Control 59 | // g.color - Raid Level Color 60 | // g.hatch_time - Hatch Time 61 | // g.end_time - End Time 62 | // g.hatch_mins - Minutes until Hatch 63 | // g.end_mins - Minutes until End 64 | // g.move_1_type - Move 1 Type Emoji 65 | // g.move_2_type - Move 2 Type Emoji 66 | // g.minCP - Minimum CP for caught Raid Boss 67 | // g.maxCP - Maximum CP for caught Raid Boss (Perfect) 68 | // g.minCP_boosted - Minimum boosted CP for caught Raid Boss 69 | // g.maxCP_boosted - Maximum boosted CP for caught Raid Boss (Perfect) 70 | // g.static_map - Static Map URL 71 | -------------------------------------------------------------------------------- /configs/embeds/raid_eggs.js.example: -------------------------------------------------------------------------------- 1 | module.exports = function(WDR, g) { 2 | 3 | // ADD YOUR CUSTOM SPACING 4 | if (g.form != "") { 5 | g.form = " " + g.form; 6 | } 7 | if (g.sponsor != "") { 8 | g.sponsor = " | " + g.sponsor; 9 | } 10 | if (g.exraid != "") { 11 | g.exraid = " | " + g.exraid; 12 | } 13 | if (g.notes != "") { 14 | g.notes = "\n" + g.notes; 15 | } 16 | 17 | // CREATE THE EGG EMBED 18 | let raid_embed = new WDR.DiscordJS.MessageEmbed() 19 | .setColor(g.color) 20 | .setThumbnail(g.sprite) 21 | .setAuthor(g.gym, g.url) 22 | .setDescription("**Level " + g.lvl + "** Raid" + "\n" + 23 | g.team + g.sponsor + "\n" + 24 | "Hatches: **" + g.hatch_time + " (*" + g.hatch_mins + " Mins*)" + "**\n" + 25 | g.exraid + g.notes + "\n" + 26 | "**" + g.area + "** | Directions:" + "\n" + 27 | g.google + " | " + g.apple + " | " + g.waze) 28 | .setImage(g.static_map); 29 | 30 | return raid_embed; 31 | } 32 | 33 | 34 | //------------------------------------------------------------------------------ 35 | // AVAILABLE VARIABLES 36 | //------------------------------------------------------------------------------ 37 | // g.form - Locale Boss Form 38 | // g.boss - Locale Gym Boss or "Egg" 39 | // g.move_1_name - Locale Move 1 Name 40 | // g.move_2_name - Locale Move 2 Name 41 | // g.lvl - Raid Level 42 | // g.sprite: - Egg / Boss Sprite 43 | // g.url - Gym Image URL 44 | // g.gym - Gym Name 45 | // g.exraid - If the Raid is an Exclusive Raid or Not 46 | // g.type - Boss Type 47 | // g.type_noemoji - Boss Type No Emojis 48 | // g.weaknesses: - Boss Type Weaknesses 49 | // g.resistances: - Boss Type Resistances 50 | // g.lat - GPS Latitude 51 | // g.lon - GPS Longitude 52 | // g.area - Geofence Area of the Sighting 53 | // g.google - Google Directions URL 54 | // g.apple - Apple Directions URL 55 | // g.waze - Waze Directions URL, 56 | // g.pmsf - PMF Map URL for Raid 57 | // g.rdm - RDM Map URL for Raid 58 | // g.team - Team Emoji and Name of Gym Control 59 | // g.color - Raid Level Color 60 | // g.hatch_time - Hatch Time 61 | // g.end_time - End Time 62 | // g.hatch_mins - Minutes until Hatch 63 | // g.end_mins - Minutes until End 64 | // g.move_1_type - Move 1 Type Emoji 65 | // g.move_2_type - Move 2 Type Emoji 66 | // g.minCP - Minimum CP for caught Raid Boss 67 | // g.maxCP - Maximum CP for caught Raid Boss (Perfect) 68 | // g.minCP_boosted - Minimum boosted CP for caught Raid Boss 69 | // g.maxCP_boosted - Maximum boosted CP for caught Raid Boss (Perfect) 70 | // g.static_map - Static Map URL 71 | -------------------------------------------------------------------------------- /configs/embeds/raids.js.example: -------------------------------------------------------------------------------- 1 | module.exports = function(WDR, g) { 2 | 3 | // ADD YOUR CUSTOM SPACING 4 | if (g.form != "") { 5 | g.form = " " + g.form; 6 | } 7 | if (g.sponsor != "") { 8 | g.sponsor = " | " + g.sponsor; 9 | } 10 | if (g.exraid != "") { 11 | g.exraid = " | " + g.exraid; 12 | } 13 | if (g.notes != "") { 14 | g.notes = "\n" + g.notes; 15 | } 16 | 17 | // CREATE THE RAID EMBED 18 | let raid_embed = new WDR.DiscordJS.MessageEmbed() 19 | .setColor(g.color) 20 | .setThumbnail(g.sprite) 21 | .setAuthor(g.gym, g.url) 22 | .setTitle("**" + g.boss + g.form_name + " Raid**") 23 | .setDescription(g.move_1_name + " " + g.move_1_type + " / " + g.move_2_name + " " + g.move_2_type + "\n" + 24 | "Raid Ends: **" + g.end_time + " (" + g.end_mins + " Mins)**" + "\n" + 25 | "Level " + g.lvl + " | " + g.team + g.sponsor + "\n" + 26 | "Counter(s): " + g.weaknesses + "\n" + 27 | g.exraid + g.notes + "\n" + 28 | "**" + g.area + " | Directions:" + "\n" + 29 | g.google + " | " + g.apple + " | " + g.waze) 30 | .setImage(g.static_map); 31 | 32 | return raid_embed; 33 | } 34 | 35 | // White space used in the default embed => " " 36 | //(Copy between the quotes. It"s not a normal space even though it looks like one.) 37 | 38 | // Other spaces: 39 | // https://www.brunildo.org/test/space-chars.html 40 | 41 | //------------------------------------------------------------------------------ 42 | // AVAILABLE VARIABLES 43 | //------------------------------------------------------------------------------ 44 | // g.form - Locale Boss Form 45 | // g.boss - Locale Gym Boss or "Egg" 46 | // g.move_1_name - Locale Move 1 Name 47 | // g.move_2_name - Locale Move 2 Name 48 | // g.lvl - Raid Level 49 | // g.sprite: - Egg / Boss Sprite 50 | // g.url - Gym Image URL 51 | // g.gym - Gym Name 52 | // g.exraid - If the Raid is an Exclusive Raid or Not 53 | // g.type - Boss Type 54 | // g.type_noemoji - Boss Type No Emojis 55 | // g.weaknesses: - Boss Type Weaknesses 56 | // g.resistances: - Boss Type Resistances 57 | // g.lat - GPS Latitude 58 | // g.lon - GPS Longitude 59 | // g.area - Geofence Area of the Sighting 60 | // g.google - Google Directions URL 61 | // g.apple - Apple Directions URL 62 | // g.waze - Waze Directions URL, 63 | // g.pmsf - PMF Map URL for Raid 64 | // g.rdm - RDM Map URL for Raid 65 | // g.team - Team Emoji and Name of Gym Control 66 | // g.color - Raid Level Color 67 | // g.hatch_time - Hatch Time 68 | // g.end_time - End Time 69 | // g.hatch_mins - Minutes until Hatch 70 | // g.end_mins - Minutes until End 71 | // g.move_1_type - Move 1 Type Emoji 72 | // g.move_2_type - Move 2 Type Emoji 73 | // g.minCP - Minimum CP for caught Raid Boss 74 | // g.maxCP - Maximum CP for caught Raid Boss (Perfect) 75 | // g.minCP_boosted - Minimum boosted CP for caught Raid Boss 76 | // g.maxCP_boosted - Maximum boosted CP for caught Raid Boss (Perfect) 77 | // g.static_map - Static Map URL 78 | -------------------------------------------------------------------------------- /configs/filters/Invasion.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "invasion", 3 | "Tier II": "all", 4 | "Bug": "None", 5 | "Ghost": "all", 6 | "Dark": "all", 7 | "Dragon": "Female", 8 | "Fairy": "all", 9 | "Fighting": "None", 10 | "Fire": "None", 11 | "Flying": "None", 12 | "Grass": "None", 13 | "Ground": "None", 14 | "Ice": "all", 15 | "Metal": "None", 16 | "Normal": "None", 17 | "Poison": "None", 18 | "Psychic": "None", 19 | "Rock": "None", 20 | "Water": "Male", 21 | "Electric": "None" 22 | } 23 | -------------------------------------------------------------------------------- /configs/filters/Lure.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "lure", 3 | "Lure_Type": [ "Normal", "Glacial", "Mossy", "Magnetic" ] 4 | } 5 | -------------------------------------------------------------------------------- /configs/filters/Quest_Encounters.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "quest", 3 | "Rewards": [ 4 | "Chansey", 5 | "Larvitar", 6 | "Nincada", 7 | "Spinda", 8 | "Dratini", 9 | "Machop", 10 | "Feebas", 11 | "Misdreavus", 12 | "Bidoof", 13 | "Cubone", 14 | "Aerodactyl", 15 | "Lapras", 16 | "Electabuzz" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /configs/filters/Quest_Items.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "quest", 3 | "Rewards": [ 4 | "Ultra Ball", 5 | "Hyper Potion", 6 | "Max Potion", 7 | "Max Revive", 8 | "Golden Razz Berry", 9 | "Fast TM", 10 | "Charged TM", 11 | "Rare Candy", 12 | "Star Piece", 13 | "1000 Stardust", 14 | "1500 Stardust", 15 | "Silver Pinap Berry" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /configs/filters/Raids_Ex_Eligible.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "raid", 3 | "Boss_Levels": [ 1, 2, 3, 4, 5 ], 4 | "Egg_Levels": [ ], 5 | "Ex_Eligible_Only": true 6 | } 7 | -------------------------------------------------------------------------------- /configs/filters/Raids_Ex_Eligible_Egg.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "raid", 3 | "Boss_Levels": [ ], 4 | "Egg_Levels": [ 1, 2, 3, 4, 5 ], 5 | "Ex_Eligible_Only": true 6 | } 7 | -------------------------------------------------------------------------------- /configs/filters/Raids_Level1&2.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "raid", 3 | "Boss_Levels": [ 1, 2 ], 4 | "Egg_Levels": [ ], 5 | "Ex_Eligible_Only": false 6 | } 7 | -------------------------------------------------------------------------------- /configs/filters/Raids_Level1&2_Egg.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "raid", 3 | "Boss_Levels": [ ], 4 | "Egg_Levels": [ 1, 2 ], 5 | "Ex_Eligible_Only": false 6 | } 7 | -------------------------------------------------------------------------------- /configs/filters/Raids_Level3&4.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "raid", 3 | "Boss_Levels": [ 3, 4 ], 4 | "Egg_Levels": [ ], 5 | "Ex_Eligible_Only": false 6 | } 7 | -------------------------------------------------------------------------------- /configs/filters/Raids_Level3&4_Egg.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "raid", 3 | "Boss_Levels": [ ], 4 | "Egg_Levels": [ 3, 4 ], 5 | "Ex_Eligible_Only": false 6 | } 7 | -------------------------------------------------------------------------------- /configs/filters/Raids_Level5.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "raid", 3 | "Boss_Levels": [ 5 ], 4 | "Egg_Levels": [ ], 5 | "Ex_Eligible_Only": false 6 | } 7 | -------------------------------------------------------------------------------- /configs/filters/Raids_Level5_Egg.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "raid", 3 | "Boss_Levels": [ ], 4 | "Egg_Levels": [ 5 ], 5 | "Ex_Eligible_Only": false 6 | } 7 | -------------------------------------------------------------------------------- /configs/filters/Raids_Level6.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "raid", 3 | "Boss_Levels": [ 6 ], 4 | "Egg_Levels": [ ], 5 | "Ex_Eligible_Only": false 6 | } 7 | -------------------------------------------------------------------------------- /configs/filters/Raids_Level6_Egg.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "raid", 3 | "Boss_Levels": [ ], 4 | "Egg_Levels": [ 6 ], 5 | "Ex_Eligible_Only": false 6 | } 7 | -------------------------------------------------------------------------------- /configs/invasion_channels/#city.ini.example: -------------------------------------------------------------------------------- 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 | [710146397671784479] 12 | geofences = Central 13 | filter = Invasion.json 14 | -------------------------------------------------------------------------------- /configs/invasion_channels/city.ini.example: -------------------------------------------------------------------------------- 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 | [710146397671784479] 12 | geofences = Central 13 | filter = Invasion.json 14 | -------------------------------------------------------------------------------- /configs/lure_channels/#city.ini.example: -------------------------------------------------------------------------------- 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 | [638939621509824513] 12 | geofences = Central 13 | filter = Lure.json 14 | -------------------------------------------------------------------------------- /configs/lure_channels/city.ini.example: -------------------------------------------------------------------------------- 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 | [638939621509824513] 12 | geofences = Central 13 | filter = Lure.json 14 | -------------------------------------------------------------------------------- /configs/pvp_channels/#city.ini.example: -------------------------------------------------------------------------------- 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 | ;[9999999999999999999] 12 | ;geofences = 13 | ;embed = 14 | ;filter = 15 | -------------------------------------------------------------------------------- /configs/quest_channels/#city.ini.example: -------------------------------------------------------------------------------- 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 | [537460180451983371] 12 | geofences = Tallahassee 13 | filter = Quest_Encounters.json 14 | 15 | [537460213956214785] 16 | geofences = Tallahassee 17 | filter = Quest_Items.json 18 | 19 | [536673792529924106] 20 | geofences = Gainesville 21 | filter = Quest_Encounters.json 22 | 23 | [536673820182839296] 24 | geofences = Gainesville 25 | filter = Quest_Items.json 26 | 27 | [540354431712100373] 28 | geofences = Montgomery 29 | filter = Quest_Encounters.json 30 | 31 | [540354458165444608] 32 | geofences = Montgomery 33 | filter = Quest_Items.json 34 | 35 | [558310346314481674] 36 | geofences = Millbrook 37 | filter = Quest_All.json 38 | 39 | [558310363616247810] 40 | geofences = Prattville 41 | filter = Quest_All.json 42 | 43 | [558310387137904674] 44 | geofences = Wetumpka 45 | filter = Quest_All.json 46 | 47 | [535192085272461322] 48 | geofences = Columbus 49 | filter = Quest_Encounters.json 50 | 51 | [535192088841814036] 52 | geofences = Columbus 53 | filter = Quest_Items.json 54 | 55 | [625421991138033664] 56 | geofences = Memphis 57 | filter = Quest_Encounters.json 58 | 59 | [625421992354512907] 60 | geofences = Memphis 61 | filter = Quest_Items.json 62 | 63 | [704691028057129054] 64 | geofences = OklahomaCity 65 | filter = Quest_Encounters.json 66 | 67 | [704691028057129055] 68 | geofences = OklahomaCity 69 | filter = Quest_Items.json 70 | 71 | [708392330914168903] 72 | geofences = OKC-Norman 73 | filter = Quest_Encounters.json 74 | 75 | [708392322873688116] 76 | geofences = OKC-Norman 77 | filter = Quest_Items.json 78 | 79 | [708387515156922520] 80 | geofences = OKC-Edmond 81 | filter = Quest_Encounters.json 82 | 83 | [708387500619464834] 84 | geofences = OKC-Edmond 85 | filter = Quest_Items.json 86 | -------------------------------------------------------------------------------- /configs/quest_channels/city.ini.example: -------------------------------------------------------------------------------- 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 | [537460180451983371] 12 | geofences = Tallahassee 13 | filter = Quest_Encounters.json 14 | 15 | [537460213956214785] 16 | geofences = Tallahassee 17 | filter = Quest_Items.json 18 | 19 | [536673792529924106] 20 | geofences = Gainesville 21 | filter = Quest_Encounters.json 22 | 23 | [536673820182839296] 24 | geofences = Gainesville 25 | filter = Quest_Items.json 26 | 27 | [540354431712100373] 28 | geofences = Montgomery 29 | filter = Quest_Encounters.json 30 | 31 | [540354458165444608] 32 | geofences = Montgomery 33 | filter = Quest_Items.json 34 | 35 | [558310346314481674] 36 | geofences = Millbrook 37 | filter = Quest_All.json 38 | 39 | [558310363616247810] 40 | geofences = Prattville 41 | filter = Quest_All.json 42 | 43 | [558310387137904674] 44 | geofences = Wetumpka 45 | filter = Quest_All.json 46 | 47 | [535192085272461322] 48 | geofences = Columbus 49 | filter = Quest_Encounters.json 50 | 51 | [535192088841814036] 52 | geofences = Columbus 53 | filter = Quest_Items.json 54 | 55 | [625421991138033664] 56 | geofences = Memphis 57 | filter = Quest_Encounters.json 58 | 59 | [625421992354512907] 60 | geofences = Memphis 61 | filter = Quest_Items.json 62 | 63 | [704691028057129054] 64 | geofences = OklahomaCity 65 | filter = Quest_Encounters.json 66 | 67 | [704691028057129055] 68 | geofences = OklahomaCity 69 | filter = Quest_Items.json 70 | 71 | [708392330914168903] 72 | geofences = OKC-Norman 73 | filter = Quest_Encounters.json 74 | 75 | [708392322873688116] 76 | geofences = OKC-Norman 77 | filter = Quest_Items.json 78 | 79 | [708387515156922520] 80 | geofences = OKC-Edmond 81 | filter = Quest_Encounters.json 82 | 83 | [708387500619464834] 84 | geofences = OKC-Edmond 85 | filter = Quest_Items.json 86 | -------------------------------------------------------------------------------- /configs/raid_channels/#city.ini.example: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /configs/raid_channels/city.ini.example: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /configs/sub_presets/pokemon/All_100%.ini.example: -------------------------------------------------------------------------------- 1 | # 0 == ALL 2 | pokemon_id = 0 3 | form = 0 4 | size = 0 5 | gender = 0 6 | gen = 0 7 | 8 | min_lvl = 1 9 | max_lvl = 35 10 | min_iv = 100 11 | max_iv = 100 12 | -------------------------------------------------------------------------------- /configs/sub_presets/pokemon/All_Gible.ini.example: -------------------------------------------------------------------------------- 1 | # 0 == ALL 2 | pokemon_id = 443 3 | form = 0 4 | size = 0 5 | gender = 0 6 | gen = 0 7 | 8 | min_lvl = 1 9 | max_lvl = 35 10 | min_iv = 0 11 | max_iv = 100 12 | -------------------------------------------------------------------------------- /configs/sub_presets/pokemon/All_Unown.ini.example: -------------------------------------------------------------------------------- 1 | # 0 == ALL 2 | pokemon_id = 201 3 | form = 0 4 | size = 0 5 | gender = 0 6 | gen = 0 7 | 8 | min_lvl = 1 9 | max_lvl = 35 10 | min_iv = 1 11 | max_iv = 100 12 | min_cp = 1 13 | max_cp = 10000 14 | -------------------------------------------------------------------------------- /configs/sub_presets/pvp/All_Great_Rank_1s.ini.example: -------------------------------------------------------------------------------- 1 | # Use 0 for all or use Pokemon ID #. Split with ',' for multiple. 2 | pokemon_id = 0 3 | 4 | # 0 for All or the pokemon type name. Only one type may be used. 5 | pokemon_type = 0 6 | 7 | # 0 for All or the league name 8 | league = 0 9 | 10 | # Use 0 for All. Must use Form ID number 11 | form = 0 12 | 13 | # Use 0 for All or Use lowercase type name. You can only set one. 14 | type = 0 15 | 16 | # Use 0 for All. Use Gen ID and split with ',' for multiple. 17 | gen = 5 18 | 19 | # 1 - 35. Do not use 0. 20 | min_lvl = 1 21 | 22 | # 1 - 20. This value cannot be higher than 20. Do not use 0. 23 | min_rank = 1 24 | -------------------------------------------------------------------------------- /configs/sub_presets/pvp/All_Rank_1s.ini.example: -------------------------------------------------------------------------------- 1 | # Use 0 for all or use Pokemon ID #. Split with ',' for multiple. 2 | pokemon_id = 0 3 | 4 | # 0 for All or the pokemon type name. Only one type may be used. 5 | pokemon_type = 0 6 | 7 | # 0 for All or the league name 8 | league = 0 9 | 10 | # Use 0 for All. Must use Form ID number 11 | form = 0 12 | 13 | # Use 0 for All or Use lowercase type name. You can only set one. 14 | type = 0 15 | 16 | # Use 0 for All. Use Gen ID and split with ',' for multiple. 17 | gen = 0 18 | 19 | # 1 - 35. Do not use 0. 20 | min_lvl = 1 21 | 22 | # 1 - 20. This value cannot be higher than 20. Do not use 0. 23 | min_rank = 1 24 | -------------------------------------------------------------------------------- /configs/sub_presets/pvp/All_Ultra_Rank_1s.ini.example: -------------------------------------------------------------------------------- 1 | # Use 0 for all or use Pokemon ID #. Split with ',' for multiple. 2 | pokemon_id = 0 3 | 4 | # 0 for All or the pokemon type name. Only one type may be used. 5 | pokemon_type = 0 6 | 7 | # 0 for All or the league name 8 | league = ultra 9 | 10 | # Use 0 for All. Must use Form ID number 11 | form = 0 12 | 13 | # Use 0 for All or Use lowercase type name. You can only set one. 14 | type = 0 15 | 16 | # Use 0 for All. Use Gen ID and split with ',' for multiple. 17 | gen = 0 18 | 19 | # 1 - 35. Do not use 0. 20 | min_lvl = 1 21 | 22 | # 1 - 20. This value cannot be higher than 20. Do not use 0. 23 | min_rank = 1 24 | -------------------------------------------------------------------------------- /configs/sub_presets/pvp/Gen5_Rank_1s.ini.example: -------------------------------------------------------------------------------- 1 | # Use 0 for all or use Pokemon ID #. Split with ',' for multiple. 2 | pokemon_id = 0 3 | 4 | # 0 for All or the pokemon type name. Only one type may be used. 5 | pokemon_type = 0 6 | 7 | # 0 for All or the league name 8 | league = 0 9 | 10 | # Use 0 for All. Must use Form ID number 11 | form = 0 12 | 13 | # Use 0 for All or Use lowercase type name. You can only set one. 14 | type = 0 15 | 16 | # Use 0 for All. Use Gen ID and split with ',' for multiple. 17 | gen = 5 18 | 19 | # 1 - 35. Do not use 0. 20 | min_lvl = 1 21 | 22 | # 1 - 20. This value cannot be higher than 20. Do not use 0. 23 | min_rank = 1 24 | -------------------------------------------------------------------------------- /configs/sub_presets/pvp/Grass_Rank_1s.ini.example: -------------------------------------------------------------------------------- 1 | # Use 0 for all or use Pokemon ID #. Split with ',' for multiple. 2 | pokemon_id = 0 3 | 4 | # 0 for All or the pokemon type name. Only one type may be used. 5 | pokemon_type = 0 6 | 7 | # 0 for All or the league name 8 | league = 0 9 | 10 | # Use 0 for All. Must use Form ID number 11 | form = 0 12 | 13 | # Use 0 for All or Use lowercase type name. You can only set one. 14 | type = grass 15 | 16 | # Use 0 for All. Use Gen ID and split with ',' for multiple. 17 | gen = 0 18 | 19 | # 1 - 35. Do not use 0. 20 | min_lvl = 1 21 | 22 | # 1 - 20. This value cannot be higher than 20. Do not use 0. 23 | min_rank = 1 24 | -------------------------------------------------------------------------------- /configs/z_maptiles/Flo-Templates/invasions.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": #(lat), 4 | "longitude": #(lon), 5 | "zoom": 15, 6 | "width": 400, 7 | "height": 220, 8 | "scale": 2, 9 | "markers": [ 10 | { 11 | "url": "#(url)", 12 | "latitude": #(lat), 13 | "longitude": #(lon), 14 | "width": 50, 15 | "height": 50 16 | }, 17 | { 18 | "url": "#(url2)", 19 | "latitude": #(lat), 20 | "longitude": #(lon), 21 | "width": 40, 22 | "height": 40, 23 | "y_offset": -40 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /configs/z_maptiles/Flo-Templates/location.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": #(lat), 4 | "longitude": #(lon), 5 | "zoom": #(zoom), 6 | "width": 400, 7 | "height": 400, 8 | "scale": 2, 9 | "markers": [ 10 | { 11 | "url": "#(url)", 12 | "latitude": #(lat), 13 | "longitude": #(lon), 14 | "width": 400, 15 | "height": 400 16 | }, 17 | { 18 | "url": "#(url2)", 19 | "latitude": #(lat), 20 | "longitude": #(lon), 21 | "width": 400, 22 | "height": 400 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /configs/z_maptiles/Flo-Templates/lures.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": #(lat), 4 | "longitude": #(lon), 5 | "zoom": 15, 6 | "width": 400, 7 | "height": 220, 8 | "scale": 2, 9 | "markers": [ 10 | { 11 | "url": "#(url)", 12 | "latitude": #(lat), 13 | "longitude": #(lon), 14 | "width": 50, 15 | "height": 50 16 | }, 17 | { 18 | "url": "#(url2)", 19 | "latitude": #(lat), 20 | "longitude": #(lon), 21 | "width": 40, 22 | "height": 40, 23 | "y_offset": -40 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /configs/z_maptiles/Flo-Templates/nest.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": #(lat), 4 | "longitude": #(lon), 5 | "zoom": 15, 6 | "width": 400, 7 | "height": 220, 8 | "scale": 2, 9 | "markers": [ 10 | { 11 | "url": "#(url2)", 12 | "latitude": #(lat), 13 | "longitude": #(lon), 14 | "width": 45, 15 | "height": 45 16 | }, 17 | { 18 | "url": "#(url)", 19 | "latitude": #(lat), 20 | "longitude": #(lon), 21 | "width": 40, 22 | "height": 40 23 | } 24 | ], 25 | "polygons": [ 26 | { 27 | "fill_color": "#87ceeb60", 28 | "stroke_color": "#000000", 29 | "stroke_width": 1, 30 | "path": [ 31 | #for(coord in polygon): 32 | #if(index!=0):,#endif[#index(coord, 0), #index(coord, 1)] 33 | #endfor 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /configs/z_maptiles/Flo-Templates/pokemon-sat.json: -------------------------------------------------------------------------------- 1 | { 2 | "grid": [ 3 | { 4 | "direction": "first", 5 | "maps": [ 6 | { 7 | "direction": "first", 8 | "map": { 9 | "style": "osm-bright", 10 | "latitude": #(lat), 11 | "longitude": #(lon), 12 | "zoom": 16, 13 | "width": 350, 14 | "height": 250, 15 | "scale": 2, 16 | "markers": [ 17 | { 18 | "url": "https://raw.githubusercontent.com/whitewillem/PogoAssets/resized/icons_large/pokemon_icon_#pad(id, 3)_#if(form > 0):#(form)#else:00#endif.png", 19 | "latitude": #(lat), 20 | "longitude": #(lon), 21 | "width": 20, 22 | "height": 20 23 | } 24 | ], 25 | "circles": [ 26 | { 27 | "fill_color": "rgba(255,255,255,0.6)", 28 | "stroke_color": "\#C7C7C7", 29 | "stroke_width": 1, 30 | "latitude": #(lat), 31 | "longitude": #(lon), 32 | "radius": 40 33 | } 34 | ] 35 | } 36 | }, 37 | { 38 | "direction": "right", 39 | "map": { 40 | "style": "mapbox-sattelite", 41 | "latitude": #(lat), 42 | "longitude": #(lon), 43 | "zoom": 18, 44 | "width": 200, 45 | "height": 250, 46 | "scale": 1, 47 | "markers": [ 48 | { 49 | "url": "https://raw.githubusercontent.com/whitewillem/PogoAssets/resized/icons_large/pokemon_icon_#pad(id, 3)_#if(form > 0):#(form)#else:00#endif.png", 50 | "latitude": #(lat), 51 | "longitude": #(lon), 52 | "width": 60, 53 | "height": 60 54 | } 55 | ], 56 | "circles": [ 57 | { 58 | "fill_color": "rgba(255,255,255,0.4)", 59 | "stroke_color": "rgba(255,255,255,0.25)", 60 | "stroke_width": 1, 61 | "latitude": #(lat), 62 | "longitude": #(lon), 63 | "radius": 40 64 | } 65 | ] 66 | } 67 | } 68 | ] 69 | } 70 | ] 71 | } -------------------------------------------------------------------------------- /configs/z_maptiles/Flo-Templates/pokemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": #(lat), 4 | "longitude": #(lon), 5 | "zoom": 15, 6 | "width": 500, 7 | "height": 275, 8 | "scale": 2, 9 | "markers": [ 10 | { 11 | "url": "#(url)", 12 | "latitude": #(lat), 13 | "longitude": #(lon), 14 | "width": 50, 15 | "height": 50 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /configs/z_maptiles/Flo-Templates/quests.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": #(lat), 4 | "longitude": #(lon), 5 | "zoom": 15, 6 | "width": 400, 7 | "height": 220, 8 | "scale": 2, 9 | "markers": [ 10 | { 11 | "url": "#(url)", 12 | "latitude": #(lat), 13 | "longitude": #(lon), 14 | "width": 50, 15 | "height": 50 16 | }, 17 | { 18 | "url": "#(url2)", 19 | "latitude": #(lat), 20 | "longitude": #(lon), 21 | "width": 40, 22 | "height": 40, 23 | "y_offset": -40 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /configs/z_maptiles/Flo-Templates/raids.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": #(lat), 4 | "longitude": #(lon), 5 | "zoom": 15, 6 | "width": 500, 7 | "height": 275, 8 | "scale": 2, 9 | "markers": [ 10 | { 11 | "url": "#(url)", 12 | "latitude": #(lat), 13 | "longitude": #(lon), 14 | "width": 50, 15 | "height": 50 16 | }, 17 | { 18 | "url": "#(url2)", 19 | "latitude": #(lat), 20 | "longitude": #(lon), 21 | "width": 55, 22 | "height": 55, 23 | "y_offset": -42 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "options": { 3 | "paths": { 4 | "root": "/usr/src/app/node_modules/tileserver-gl-styles", 5 | "fonts": "/data/fonts", 6 | "styles": "/data/styles", 7 | "mbtiles": "/data/mbtiles" 8 | } 9 | }, 10 | "styles": { 11 | "klokantech-basic": { 12 | "style": "klokantech-basic/style.json" 13 | }, 14 | "dark-matter": { 15 | "style": "dark-matter/style.json" 16 | }, 17 | "osm-bright": { 18 | "style": "osm-bright/style.json" 19 | }, 20 | "positron": { 21 | "style": "positron/style.json" 22 | } 23 | }, 24 | "data": { 25 | "v3": { 26 | "mbtiles": "north-america.mbtiles" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/dark-matter/icons/circle-11.svg: -------------------------------------------------------------------------------- 1 | circle-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/dark-matter/icons/star-11.svg: -------------------------------------------------------------------------------- 1 | star-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/dark-matter/icons/wood-pattern.svg: -------------------------------------------------------------------------------- 1 | 2 | pedestrian-polygon 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/dark-matter/sprite.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 17, 4 | "pixelRatio": 1, 5 | "width": 17, 6 | "x": 64, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 17, 11 | "pixelRatio": 1, 12 | "width": 17, 13 | "x": 81, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 64, 18 | "pixelRatio": 1, 19 | "width": 64, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/dark-matter/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/dark-matter/sprite.png -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/dark-matter/sprite@2x.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 34, 4 | "pixelRatio": 2, 5 | "width": 34, 6 | "x": 128, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 34, 11 | "pixelRatio": 2, 12 | "width": 34, 13 | "x": 162, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 128, 18 | "pixelRatio": 2, 19 | "width": 128, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/dark-matter/sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/dark-matter/sprite@2x.png -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/klokantech-basic/icons/circle-11.svg: -------------------------------------------------------------------------------- 1 | circle-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/klokantech-basic/icons/star-11.svg: -------------------------------------------------------------------------------- 1 | star-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/klokantech-basic/icons/wood-pattern.svg: -------------------------------------------------------------------------------- 1 | 2 | pedestrian-polygon 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/klokantech-basic/sprite.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 17, 4 | "pixelRatio": 1, 5 | "width": 17, 6 | "x": 64, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 17, 11 | "pixelRatio": 1, 12 | "width": 17, 13 | "x": 81, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 64, 18 | "pixelRatio": 1, 19 | "width": 64, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/klokantech-basic/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/klokantech-basic/sprite.png -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/klokantech-basic/sprite@2x.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 34, 4 | "pixelRatio": 2, 5 | "width": 34, 6 | "x": 128, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 34, 11 | "pixelRatio": 2, 12 | "width": 34, 13 | "x": 162, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 128, 18 | "pixelRatio": 2, 19 | "width": 128, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/klokantech-basic/sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/klokantech-basic/sprite@2x.png -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/osm-bright/icons/circle-11.svg: -------------------------------------------------------------------------------- 1 | circle-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/osm-bright/icons/star-11.svg: -------------------------------------------------------------------------------- 1 | star-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/osm-bright/icons/wood-pattern.svg: -------------------------------------------------------------------------------- 1 | 2 | pedestrian-polygon 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/osm-bright/sprite.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 17, 4 | "pixelRatio": 1, 5 | "width": 17, 6 | "x": 64, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 17, 11 | "pixelRatio": 1, 12 | "width": 17, 13 | "x": 81, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 64, 18 | "pixelRatio": 1, 19 | "width": 64, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/osm-bright/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/osm-bright/sprite.png -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/osm-bright/sprite@2x.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 34, 4 | "pixelRatio": 2, 5 | "width": 34, 6 | "x": 128, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 34, 11 | "pixelRatio": 2, 12 | "width": 34, 13 | "x": 162, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 128, 18 | "pixelRatio": 2, 19 | "width": 128, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/osm-bright/sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/osm-bright/sprite@2x.png -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-daytime/icons/circle-11.svg: -------------------------------------------------------------------------------- 1 | circle-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-daytime/icons/star-11.svg: -------------------------------------------------------------------------------- 1 | star-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-daytime/icons/wood-pattern.svg: -------------------------------------------------------------------------------- 1 | 2 | pedestrian-polygon 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-daytime/sprite.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 17, 4 | "pixelRatio": 1, 5 | "width": 17, 6 | "x": 64, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 17, 11 | "pixelRatio": 1, 12 | "width": 17, 13 | "x": 81, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 64, 18 | "pixelRatio": 1, 19 | "width": 64, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-daytime/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/pogo-daytime/sprite.png -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-daytime/sprite@2x.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 34, 4 | "pixelRatio": 2, 5 | "width": 34, 6 | "x": 128, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 34, 11 | "pixelRatio": 2, 12 | "width": 34, 13 | "x": 162, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 128, 18 | "pixelRatio": 2, 19 | "width": 128, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-daytime/sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/pogo-daytime/sprite@2x.png -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-nitetime/icons/circle-11.svg: -------------------------------------------------------------------------------- 1 | circle-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-nitetime/icons/star-11.svg: -------------------------------------------------------------------------------- 1 | star-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-nitetime/icons/wood-pattern.svg: -------------------------------------------------------------------------------- 1 | 2 | pedestrian-polygon 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-nitetime/sprite.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 17, 4 | "pixelRatio": 1, 5 | "width": 17, 6 | "x": 64, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 17, 11 | "pixelRatio": 1, 12 | "width": 17, 13 | "x": 81, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 64, 18 | "pixelRatio": 1, 19 | "width": 64, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-nitetime/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/pogo-nitetime/sprite.png -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-nitetime/sprite@2x.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 34, 4 | "pixelRatio": 2, 5 | "width": 34, 6 | "x": 128, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 34, 11 | "pixelRatio": 2, 12 | "width": 34, 13 | "x": 162, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 128, 18 | "pixelRatio": 2, 19 | "width": 128, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/pogo-nitetime/sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/pogo-nitetime/sprite@2x.png -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/positron/icons/circle-11.svg: -------------------------------------------------------------------------------- 1 | circle-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/positron/icons/star-11.svg: -------------------------------------------------------------------------------- 1 | star-11.svg -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/positron/icons/wood-pattern.svg: -------------------------------------------------------------------------------- 1 | 2 | pedestrian-polygon 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/positron/sprite.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 17, 4 | "pixelRatio": 1, 5 | "width": 17, 6 | "x": 64, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 17, 11 | "pixelRatio": 1, 12 | "width": 17, 13 | "x": 81, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 64, 18 | "pixelRatio": 1, 19 | "width": 64, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/positron/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/positron/sprite.png -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/positron/sprite@2x.json: -------------------------------------------------------------------------------- 1 | { 2 | "circle-11": { 3 | "height": 34, 4 | "pixelRatio": 2, 5 | "width": 34, 6 | "x": 128, 7 | "y": 0 8 | }, 9 | "star-11": { 10 | "height": 34, 11 | "pixelRatio": 2, 12 | "width": 34, 13 | "x": 162, 14 | "y": 0 15 | }, 16 | "wood-pattern": { 17 | "height": 128, 18 | "pixelRatio": 2, 19 | "width": 128, 20 | "x": 0, 21 | "y": 0 22 | } 23 | } -------------------------------------------------------------------------------- /configs/z_maptiles/TileServer/styles/positron/sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/configs/z_maptiles/TileServer/styles/positron/sprite@2x.png -------------------------------------------------------------------------------- /configs/z_maptiles/Versx-Templates/location.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": #(lat), 4 | "longitude": #(lon), 5 | "zoom": #(zoom), 6 | "width": 400, 7 | "height": 400, 8 | "scale": 2, 9 | "markers": [ 10 | { 11 | "url": "#(url)", 12 | "latitude": #(lat), 13 | "longitude": #(lon), 14 | "width": 400, 15 | "height": 400 16 | }, 17 | { 18 | "url": "#(url2)", 19 | "latitude": #(lat), 20 | "longitude": #(lon), 21 | "width": 400, 22 | "height": 400 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /configs/z_maptiles/Versx-Templates/nest.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": #(lat), 4 | "longitude": #(lon), 5 | "zoom": 15, 6 | "width": 400, 7 | "height": 220, 8 | "scale": 2, 9 | "markers": [ 10 | #if(gyms != nil): 11 | #for(pg in gyms): 12 | #if(index(pg, 2) === 0): 13 | { 14 | "url": "https://raw.githubusercontent.com/whitewillem/PMSF/develop/static/forts/shield/Uncontested.png", 15 | "latitude": #index(pg, 0), 16 | "longitude": #index(pg, 1), 17 | "width": 20, 18 | "height": 20, 19 | "y_offset": -8 20 | }, 21 | #endif 22 | #if(index(pg, 2) == 1): 23 | { 24 | "url": "https://raw.githubusercontent.com/whitewillem/PMSF/develop/static/forts/shield/Mystic.png", 25 | "latitude": #index(pg, 0), 26 | "longitude": #index(pg, 1), 27 | "width": 20, 28 | "height": 20, 29 | "y_offset": -8 30 | }, 31 | #endif 32 | #if(index(pg, 2) == 2): 33 | { 34 | "url": "https://raw.githubusercontent.com/whitewillem/PMSF/develop/static/forts/shield/Valor.png", 35 | "latitude": #index(pg, 0), 36 | "longitude": #index(pg, 1), 37 | "width": 20, 38 | "height": 20, 39 | "y_offset": -8 40 | }, 41 | #endif 42 | #if(index(pg, 2) == 3): 43 | { 44 | "url": "https://raw.githubusercontent.com/whitewillem/PMSF/develop/static/forts/shield/Instinct.png", 45 | "latitude": #index(pg, 0), 46 | "longitude": #index(pg, 1), 47 | "width": 20, 48 | "height": 20, 49 | "y_offset": -8 50 | }, 51 | #endif 52 | #endfor 53 | #endif 54 | #if(stops != nil): 55 | #for(ps in stops): 56 | { 57 | "url": "#(url3)", 58 | "latitude": #index(ps, 0), 59 | "longitude": #index(ps, 1), 60 | "width": 20, 61 | "height": 20, 62 | "y_offset": -8 63 | }, 64 | #endfor 65 | #endif 66 | { 67 | "url": "#(url2)", 68 | "latitude": #(lat), 69 | "longitude": #(lon), 70 | "width": 45, 71 | "height": 45 72 | }, 73 | { 74 | "url": "#(url)", 75 | "latitude": #(lat), 76 | "longitude": #(lon), 77 | "width": 40, 78 | "height": 40 79 | } 80 | ], 81 | "polygons": [ 82 | { 83 | "fill_color": "#87ceeb60", 84 | "stroke_color": "#000000", 85 | "stroke_width": 1, 86 | "path": [ 87 | #for(coord in polygon): 88 | #if(index!=0):,#endif[#index(coord, 0), #index(coord, 1)] 89 | #endfor 90 | ] 91 | } 92 | ] 93 | } 94 | -------------------------------------------------------------------------------- /configs/z_maptiles/Versx-Templates/pokemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": <%= lat %>, 4 | "longitude": <%= lon %>, 5 | "zoom": 15, 6 | "width": 500, 7 | "height": 275, 8 | "scale": 1, 9 | "markers": [ 10 | { 11 | "url": "<%= url %>", 12 | "latitude": <%= lat %>, 13 | "longitude": <%= lon %>, 14 | "width": 50, 15 | "height": 50 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /configs/z_maptiles/Versx-Templates/quests.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": #(lat), 4 | "longitude": #(lon), 5 | "zoom": 15, 6 | "width": 400, 7 | "height": 220, 8 | "scale": 2, 9 | "markers": [ 10 | { 11 | "url": "#(url)", 12 | "latitude": #(lat), 13 | "longitude": #(lon), 14 | "width": 50, 15 | "height": 50 16 | }, 17 | { 18 | "url": "#(url2)", 19 | "latitude": #(lat), 20 | "longitude": #(lon), 21 | "width": 40, 22 | "height": 40, 23 | "y_offset": -40 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /configs/z_maptiles/Versx-Templates/raids.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": <%= lat %>, 4 | "longitude": <%= lon %>, 5 | "zoom": 15, 6 | "width": 500, 7 | "height": 275, 8 | "scale": 1, 9 | "markers": [ 10 | <% if (stops != null) { %> 11 | <% stops.forEach(function(stop) { %> 12 | { 13 | "url": "<%= stop.marker %>", 14 | "latitude": <%= stop.lat %>, 15 | "longitude": <%= stop.lon %>, 16 | "width": 18, 17 | "height": 18 18 | }, 19 | <% }); %> 20 | <% } %> 21 | <% if (gyms != null) { %> 22 | <% gyms.forEach(function(gym) { %> 23 | { 24 | "url": "<%= gym.marker %>", 25 | "latitude": <%= gym.lat %>, 26 | "longitude": <%= gym.lon %>, 27 | "height": 20, 28 | "width": 20, 29 | }, 30 | { 31 | "url": "<%= gym.sprite %>", 32 | "latitude": <%= gym.lat %>, 33 | "longitude": <%= gym.lon %>, 34 | "height": 20, 35 | "width": 20, 36 | }, 37 | <% }); %> 38 | <% } %> 39 | { 40 | "url": "<%= url %>", 41 | "latitude": <%= lat %>, 42 | "longitude": <%= lon %>, 43 | "width": 50, 44 | "height": 50 45 | }, 46 | { 47 | "url": "<%= url2 %>", 48 | "latitude": <%= lat %>, 49 | "longitude": <%= lon %>, 50 | "width": 55, 51 | "height": 55, 52 | "y_offset": -40 53 | } 54 | ] 55 | } 56 | -------------------------------------------------------------------------------- /configs/z_maptiles/Versx-Templates/staticmap-complex.example.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": <%= lat %>, 4 | "longitude": <%= lon %>, 5 | "zoom": 15, 6 | "width": 500, 7 | "height": 250, 8 | "scale": 1, 9 | "markers": [ 10 | <% if (stops != null) { %> 11 | <% stops.forEach(function(stop) { %> 12 | { 13 | "url": "<%= stop.marker %>", 14 | "latitude": <%= stop.lat %>, 15 | "longitude": <%= stop.lon %>, 16 | "width": 50, 17 | "height": 50 18 | }, 19 | <% }); %> 20 | <% } %> 21 | <% if (gyms != null) { %> 22 | <% gyms.forEach(function(gym) { %> 23 | { 24 | "url": "<%= gym.marker %>", 25 | "latitude": <%= gym.lat %>, 26 | "longitude": <%= gym.lon %>, 27 | "width": 50, 28 | "height": 50 29 | }, 30 | <% }); %> 31 | <% } %> 32 | { 33 | "url": "<%= url %>", 34 | "latitude": <%= lat %>, 35 | "longitude": <%= lon %>, 36 | "width": 50, 37 | "height": 50 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /configs/z_maptiles/Versx-Templates/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "klokantech-basic", 3 | "latitude": <%= lat %>, 4 | "longitude": <%= lon %>, 5 | "zoom": 15, 6 | "width": 500, 7 | "height": 250, 8 | "scale": 1, 9 | "markers": [ 10 | <% if (stops != null) { %> 11 | <% stops.forEach(function(stop) { %> 12 | { 13 | "url": "https://raw.githubusercontent.com/whitewillem/PMSF/develop/static/forts/Pstop.png", 14 | "latitude": <%= stop.lat %>, 15 | "longitude": <%= stop.lon %>, 16 | "width": 20, 17 | "height": 20, 18 | "y_offset": -8 19 | }, 20 | <% }); %> 21 | <% } %> 22 | <% if (gyms != null) { %> 23 | <% gyms.forEach(function(gym) { %> 24 | { 25 | "url": "https://raw.githubusercontent.com/whitewillem/PMSF/develop/static/forts/shield/<%= gym.team %>", 26 | "latitude": <%= gym.lat %>, 27 | "longitude": <%= gym.lon %>, 28 | "width": 20, 29 | "height": 20, 30 | "y_offset": -8 31 | }, 32 | <% }); %> 33 | <% } %> 34 | { 35 | "url": "<%= url %>", 36 | "latitude": <%= lat %>, 37 | "longitude": <%= lon %>, 38 | "width": 45, 39 | "height": 45 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "version": "2.0.0b8", 4 | "lockfileVersion": 1, 5 | "scripts": { 6 | "start": "node wdr.js" 7 | }, 8 | "dependencies": { 9 | "axios": "^0.21.1", 10 | "cli-progress": "^3.8.2", 11 | "colors": "^1.4.0", 12 | "discord.js": "^12.2.0", 13 | "eslint": "^7.12.1", 14 | "express": "^4.17.1", 15 | "fs-extra": "^9.0.0", 16 | "fuzzy": "^0.1.3", 17 | "geo-distance": "^0.2.0", 18 | "geo-tz": "^6.0.0", 19 | "image-downloader": "^4.0.1", 20 | "image-stroke": "^0.1.1", 21 | "ini": "^1.3.6", 22 | "moment": "^2.25.3", 23 | "moment-timezone": "^0.5.28", 24 | "mysql2": "^2.1.0", 25 | "ontime": "0.0.6", 26 | "path": "^0.12.7", 27 | "point-in-geopolygon": "^1.0.1", 28 | "point-in-polygon": "^1.0.1", 29 | "protobufjs": "^6.9.0", 30 | "purified-protos": "^0.189.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/commands/admin/role.js: -------------------------------------------------------------------------------- 1 | module.exports = async (WDR, message) => { 2 | console.log('[ROLE_COMMAND] Starting...'); 3 | let members = message.guild.members.cache.map(m => m); 4 | //let role_name = message.content.slice(6, 0); 5 | let role = message.guild.donorRoles.cache.find(role => role.name === 'Trainers'); 6 | for (let m = 0; m < members.length; m++) { 7 | setTimeout(function() { 8 | if (!members[m].roles.cache.has(role.id)) { 9 | members[m].roles.add(role).catch(console.error); 10 | console.log('[ROLE] Added ' + role.name + ' to ' + members[m].user.tag); 11 | } 12 | }, 2000 * m); 13 | } 14 | return; 15 | }; -------------------------------------------------------------------------------- /src/commands/command-admin.js: -------------------------------------------------------------------------------- 1 | module.exports = (WDR, Message) => { 2 | let command = Message.content.split(' ')[0].slice(1); 3 | try { 4 | if (WDR.Fs.existsSync(WDR.Dir + '/src/commands/admin/' + command.toLowerCase() + '.js')) { 5 | let Cmd = require(WDR.Dir + '/src/commands/admin/' + command.toLowerCase() + '.js'); 6 | Cmd(WDR, Message); 7 | } else { 8 | console.log(WDR.Dir + '/src/commands/admin/' + command.toLowerCase() + '.js does not exist'); 9 | } 10 | } catch (error) { 11 | console.error(error); 12 | } 13 | }; -------------------------------------------------------------------------------- /src/commands/command-public.js: -------------------------------------------------------------------------------- 1 | module.exports = (WDR, Message) => { 2 | let command = Message.content.split(' ')[0].slice(1); 3 | try { 4 | switch(command){ 5 | case 'event': 6 | command = 'events'; break; 7 | } 8 | if (WDR.Fs.existsSync(WDR.Dir + '/src/commands/public/' + command.toLowerCase() + '.js')) { 9 | let Cmd = require(WDR.Dir + '/src/commands/public/' + command.toLowerCase() + '.js'); 10 | Cmd(WDR, Message); 11 | } else { 12 | console.log(WDR.Dir + '/src/commands/public/' + command.toLowerCase() + '.js does not exist'); 13 | } 14 | } catch (error) { 15 | console.error(error); 16 | } 17 | }; -------------------------------------------------------------------------------- /src/commands/public/events.js: -------------------------------------------------------------------------------- 1 | //let Embed_Config = require('../../../configs/embeds/events.js'); 2 | 3 | module.exports = async (WDR, message) => { 4 | let json = await WDR.Fetch_JSON('https://raw.githubusercontent.com/ccev/pogoinfo/info/events/active.json'); 5 | let event = { 6 | name: json.name, 7 | start: (json.start ? WDR.Moment(json.start, 'YYYY-MM-DD HH:mm').format('h:mma DD-MMM') : 'n/a'), 8 | end: (json.end ? WDR.Moment(json.end, 'YYYY-MM-DD HH:mm').format('h:mma D-MMM') : 'n/a'), 9 | bonuses: '**Bonuses:**' + '\n' + json.details.bonuses.join('\n'), 10 | spawns: '**Spawns:**' + '\n', 11 | raids: '', 12 | quests: '**Quests:**' + '\n', 13 | eggs: '' 14 | }; 15 | if(json.details.spawns.length > 0){ 16 | for(let s = 0, slen = json.details.bonuses.length; s < slen; s++){ 17 | event.bonuses += ' - ' + json.details.bonuses[s] + '\n'; 18 | } 19 | } 20 | if(json.details.spawns.length > 0){ 21 | for(let s = 0, slen = json.details.spawns.length; s < slen; s++){ 22 | let id = json.details.spawns[s].split('_')[0]; 23 | let form = json.details.spawns[s].split('_')[1]; 24 | let pokemon = await WDR.Get_Locale.Pokemon(WDR, { 25 | discord: message.discord, 26 | pokemon_id: parseInt(id), 27 | form: parseInt(form ) 28 | }); 29 | event.spawns += ' - ' + pokemon.pokemon_name + ' ' + pokemon.form_name + '\n'; 30 | } 31 | } 32 | for (var key in json.details.quests) { 33 | let task = key; 34 | let rewards = json.details.quests[key], reward = ''; 35 | for(let rw = 0, rwlen = rewards.length; rw < rwlen; rw++){ 36 | if(rewards[rw].includes('_')){ 37 | let rw_id = rewards[rw].split('_')[0]; 38 | let rw_form = rewards[rw].split('_')[1]; 39 | let pokemon = await WDR.Get_Locale.Pokemon(WDR, { 40 | discord: message.discord, 41 | pokemon_id: parseInt(rw_id), 42 | form: parseInt(rw_form) 43 | }); 44 | reward += pokemon.pokemon_name + ' ' + pokemon.form_name + ' or '; 45 | } else { 46 | reward += rewards[rw] + ' or '; 47 | } 48 | reward = reward.slice(0,-4).replace(/\s\s+/g, ' '); 49 | } 50 | event.quests += ' - ' + task + ' for ' + reward + '\n'; 51 | } 52 | // for (var rkey in json.details.raids) { 53 | // WDR.Console.error(WDR,'[commands/public/event.js] Saw raids in the event json. Report this to the WDR Git repo as an Issue.', json.details.raids); 54 | // } 55 | // for (var ekey in json.details.eggs) { 56 | // WDR.Console.error(WDR,'[commands/public/event.js] Saw eggs in the event json. Report this to the WDR Git repo as an Issue.', json.details.eggs); 57 | // } 58 | let embed = new WDR.DiscordJS.MessageEmbed() 59 | .setAuthor('Current Active PoGo Event:','https://pokemongolive.com/img/posts/nov2019-events.jpg') 60 | .setTitle(event.name) 61 | .setDescription('**Starts:** `' + event.start + '`' + '\n' + '\n' + 62 | '**Ends:** `' + event.end + '`' + '\n' + '\n' + 63 | event.bonuses + '\n' + 64 | event.spawns + '\n' + 65 | event.quests); 66 | WDR.Send_Embed(WDR, embed, message.channel.id).then(m => m.delete({ 67 | timeout: 60000 68 | })); 69 | }; -------------------------------------------------------------------------------- /src/commands/subscription/area/begin.js: -------------------------------------------------------------------------------- 1 | var Functions = { 2 | Add: require(__dirname + '/add.js'), 3 | Cancel: require(__dirname + '/../cancel.js'), 4 | DetailCollect: require(__dirname + '/collect_detail.js'), 5 | OptionCollect: require(__dirname + '/collect_option.js'), 6 | Remove: require(__dirname + '/remove.js'), 7 | TimedOut: require(__dirname + '/../timedout.js'), 8 | View: require(__dirname + '/view.js'), 9 | Dir: __filename.split('/').slice(__dirname.split('/').length - 4).join('/') 10 | }; 11 | 12 | module.exports = async (WDR, message) => { 13 | 14 | var Member = message.member ? message.member : message.author; 15 | 16 | let geofence = await WDR.Geofences.get(message.discord.geojson_file); 17 | 18 | if (!geofence) { 19 | return message.reply('No geofence file has been set for this server. Contact a server admin if you think this is incorrect.').then(m => m.delete({ 20 | timeout: 5000 21 | })).catch(console.error); 22 | } 23 | 24 | let AreaArray = []; 25 | await geofence.features.forEach((geofence) => { 26 | AreaArray.push(geofence.properties.name); 27 | }); 28 | 29 | AreaArray.sort(); 30 | 31 | if (Member.db.geotype != 'areas') { 32 | let keep_location = await Functions.DetailCollect(WDR, Functions, 'Area', Member, message, Member.db, 'Type \'Yes\' to override and continue or \'No\' to cancel and keep area-based subscriptions.', null, AreaArray); 33 | if (keep_location == false) { 34 | let kept_location = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 35 | .setAuthor(message.member.db.user_name, message.member.user.displayAvatarURL()) 36 | .setTitle('You have chose to keep **Location-Based** notifications.') 37 | .setFooter('You can modify your location-based settings by using the \'' + WDR.Config.PREFIX + 'location\' command.'); 38 | return message.reply(kept_location).then(m => m.delete({ 39 | timeout: 10000 40 | })).catch(console.error); 41 | } else { 42 | WDR.UpdateAllSubTables(WDR, `UPDATE %TABLE% SET geotype = 'areas' WHERE geotype = 'location' AND user_id = '${Member.id}'`); 43 | WDR.wdrDB.query(` 44 | UPDATE 45 | wdr_users 46 | SET 47 | geotype = 'areas' 48 | WHERE 49 | user_id = '${Member.id}' 50 | AND 51 | guild_id = '${message.guild.id}' 52 | ;`); 53 | let now_area = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 54 | .setAuthor(message.member.db.user_name, message.member.user.displayAvatarURL()) 55 | .setTitle('You have changed to **Area-Based** notifications.'); 56 | return message.reply(now_area).then(m => m.delete({ 57 | timeout: 5000 58 | })).catch(console.error); 59 | } 60 | } 61 | 62 | let requestAction = new WDR.DiscordJS.MessageEmbed() 63 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 64 | .setTitle('What would you like to do with your Area Subscriptions?') 65 | .setDescription('`view` » View your Areas.' + '\n' + 66 | '`add` » Add an Area.' + '\n' + 67 | '`remove` » Remove an Area.') 68 | .setFooter('Type the action, no command prefix required.'); 69 | 70 | message.channel.send(requestAction).catch(console.error).then(BotMsg => { 71 | return Functions.OptionCollect(WDR, Functions, 'start', message, BotMsg, Member, AreaArray); 72 | }); 73 | }; 74 | -------------------------------------------------------------------------------- /src/commands/subscription/area/collect_option.js: -------------------------------------------------------------------------------- 1 | module.exports = (WDR, Functions, source, oMessage, bMessage, Member, AreaArray) => { 2 | 3 | let BotMsg = bMessage; 4 | let OriginalMsg = oMessage; 5 | 6 | const filter = CollectedMsg => CollectedMsg.author.id == OriginalMsg.author.id; 7 | const collector = OriginalMsg.channel.createMessageCollector(filter, { 8 | time: 60000 9 | }); 10 | 11 | // FILTER COLLECT EVENT 12 | collector.on('collect', CollectedMsg => { 13 | 14 | if (BotMsg.channel.type != 'dm') { 15 | CollectedMsg.delete(); 16 | } 17 | 18 | switch (CollectedMsg.content.toLowerCase()) { 19 | case 'add': 20 | collector.stop('add'); 21 | break; 22 | case 'remove': 23 | collector.stop('remove'); 24 | break; 25 | case 'view': 26 | collector.stop('view'); 27 | break; 28 | case 'cancel': 29 | collector.stop('cancel'); 30 | break; 31 | } 32 | }); 33 | 34 | // COLLECTOR HAS BEEN ENDED 35 | collector.on('end', (collected, msg) => { 36 | 37 | if (BotMsg && BotMsg.channel.type != 'dm') { 38 | BotMsg.delete(); 39 | } 40 | 41 | switch (msg) { 42 | case 'add': 43 | return Functions.Add(WDR, Functions, OriginalMsg, Member, AreaArray); 44 | case 'distance': 45 | return Functions.Distance(WDR, Functions, OriginalMsg, Member, AreaArray); 46 | case 'remove': 47 | return Functions.Remove(WDR, Functions, OriginalMsg, Member, AreaArray); 48 | case 'view': 49 | return Functions.View(WDR, Functions, OriginalMsg, Member, AreaArray); 50 | case 'end': 51 | return null; 52 | case 'time': 53 | if (source != 'complete') { 54 | return Functions.TimedOut(WDR, Functions, OriginalMsg, Member); 55 | } 56 | return null; 57 | default: 58 | return null; 59 | } 60 | }); 61 | 62 | // END 63 | return; 64 | }; -------------------------------------------------------------------------------- /src/commands/subscription/area/remove.js: -------------------------------------------------------------------------------- 1 | module.exports = async (WDR, Functions, message, Member, AreaArray) => { 2 | let query = ` 3 | SELECT 4 | * 5 | FROM 6 | wdr_users 7 | WHERE 8 | user_id = '${Member.id}' 9 | AND 10 | guild_id = '${message.guild.id}'; 11 | `; 12 | WDR.wdrDB.query( 13 | query, 14 | async function(error, user) { 15 | 16 | let sub = await Functions.DetailCollect(WDR, Functions, 'Remove', Member, message, null, 'Names are not case-sensitive. The Check denotes you are already subscribed to that Area. Type `reset` to revert to your areas to default.', user[0].areas, AreaArray); 17 | if (sub.toLowerCase() == 'cancel') { 18 | return message.reply('Subscription cancelled. Type `' + WDR.Config.PREFIX + 'area` to restart.').then(m => m.delete({ 19 | timeout: 5000 20 | })).catch(console.error); 21 | } else if (sub == 'time') { 22 | return message.reply('Your subscription has timed out.').then(m => m.delete({ 23 | timeout: 5000 24 | })).catch(console.error); 25 | } 26 | 27 | let areas = user[0].areas.split(','); 28 | let area_index = areas.indexOf(sub); 29 | 30 | if (sub == 'all') { 31 | areas = []; 32 | } else if (sub == 'reset') { 33 | areas = message.discord.name; 34 | } else { 35 | areas.splice(area_index, 1); 36 | } 37 | 38 | if (areas.length === 0) { 39 | areas = 'None'; 40 | } else { 41 | areas = areas.toString(); 42 | } 43 | 44 | WDR.UpdateAllSubTables(WDR, `UPDATE %TABLE% SET areas = '${areas}' WHERE user_id = '${Member.id}'; `); 45 | 46 | 47 | let update = ` 48 | UPDATE 49 | wdr_users 50 | SET 51 | areas = '${areas}' 52 | WHERE 53 | user_id = '${Member.id}' 54 | ;`; 55 | WDR.wdrDB.query( 56 | update, 57 | function(error) { 58 | if (error) { 59 | WDR.Console.error(WDR, '[subs/poke/create.js] Error Updating User Geofences.', [update, error]); 60 | return message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete({ 61 | timeout: 10000 62 | })); 63 | } else { 64 | let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 65 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 66 | .setTitle('**' + sub + '** Area Removed!') 67 | .setFooter('Saved to the Database.'); 68 | return message.channel.send(subscription_success).then(BotMsg => { 69 | return Functions.OptionCollect(WDR, Functions, 'remove', message, BotMsg, Member, AreaArray); 70 | }); 71 | } 72 | } 73 | ); 74 | } 75 | ); 76 | }; -------------------------------------------------------------------------------- /src/commands/subscription/area/view.js: -------------------------------------------------------------------------------- 1 | module.exports = async (WDR, Functions, message, Member, AreaArray) => { 2 | let query = ` 3 | SELECT 4 | * 5 | FROM 6 | wdr_users 7 | WHERE 8 | user_id = '${Member.id}' 9 | AND 10 | guild_id = '${message.guild.id}' 11 | ;`; 12 | WDR.wdrDB.query( 13 | query, 14 | function(error, user) { 15 | if (error) { 16 | WDR.Console.error(WDR, '[subs/poke/create.js] Error Fetching Subscriptions to Create Subscription.', [query, error]); 17 | return message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete({ 18 | timeout: 10000 19 | })); 20 | } else if (!user || !user[0]) { 21 | return; 22 | } else { 23 | let area_list = ''; 24 | if (!user[0].areas) { 25 | area_list = 'None'; 26 | } else { 27 | area_list = user[0].areas.replace(/;/g, '\n').replace(/,/g, '\n'); 28 | } 29 | 30 | // CREATE THE EMBED 31 | let area_subs = new WDR.DiscordJS.MessageEmbed() 32 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 33 | .setTitle('Area Subscriptions') 34 | .setDescription('Overall Status: `' + user[0].status + '`') 35 | .addField('Your Areas:', '**' + area_list + '**', false) 36 | .setFooter('You can type \'view\', \'add\', or \'remove\'.'); 37 | 38 | // SEND THE EMBED 39 | message.channel.send(area_subs).catch(console.error).then(BotMsg => { 40 | return Functions.OptionCollect(WDR, Functions, 'view', message, BotMsg, Member, AreaArray); 41 | }); 42 | } 43 | } 44 | ); 45 | }; -------------------------------------------------------------------------------- /src/commands/subscription/cancel.js: -------------------------------------------------------------------------------- 1 | module.exports = (WDR, Functions, Message, Member, type) => { 2 | if (!type) { 3 | let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 4 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 5 | .setTitle('Subscription Cancelled.') 6 | .setDescription('Nothing has been Saved.'); 7 | return Message.reply(subscription_cancel).then(m => m.delete({ 8 | timeout: 5000 9 | })).catch(console.error); 10 | } else { 11 | let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 12 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 13 | .setTitle(type + ' Subscription Cancelled.') 14 | .setDescription('Nothing has been Saved.'); 15 | return Message.reply(subscription_cancel).then(m => m.delete({ 16 | timeout: 5000 17 | })).catch(console.error); 18 | } 19 | }; -------------------------------------------------------------------------------- /src/commands/subscription/location/begin.js: -------------------------------------------------------------------------------- 1 | var Functions = { 2 | Create: require(__dirname + '/create.js'), 3 | Cancel: require(__dirname + '/../cancel.js'), 4 | DetailCollect: require(__dirname + '/collect_detail.js'), 5 | Remove: require(__dirname + '/remove.js'), 6 | OptionCollect: require(__dirname + '/collect_option.js'), 7 | Modify: require(__dirname + '/modify.js'), 8 | TimedOut: require(__dirname + '/../timedout.js'), 9 | Set: require(__dirname + '/set.js'), 10 | View: require(__dirname + '/view.js'), 11 | Dir: __filename.split('/').slice(__dirname.split('/').length - 4).join('/') 12 | }; 13 | 14 | module.exports = async (WDR, Message) => { 15 | 16 | var Member = Message.member ? Message.member : Message.author; 17 | 18 | if (Member.db.geotype != 'location') { 19 | let location = await Functions.DetailCollect(WDR, Functions, 'Area', Member, Message, Member.db, 'Type \'Yes\' or \'No\'.'); 20 | if (location == false) { 21 | let location_keep = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 22 | .setAuthor(Message.member.db.user_name, Message.member.user.displayAvatarURL()) 23 | .setTitle('You have chose to keep Area-Based DM Alerts.') 24 | .setFooter('You can modify your area-based settings by using the \'' + WDR.Config.PREFIX + 'area\' command.'); 25 | Message.reply(location_keep).then(m => m.delete({ 26 | timeout: 10000 27 | })).catch(console.error); 28 | } else { 29 | WDR.UpdateAllSubTables(WDR, `UPDATE %TABLE% SET geotype = 'location' WHERE user_id = '${Member.id}' AND geotype = 'areas'; `); 30 | WDR.wdrDB.query(` 31 | UPDATE 32 | wdr_users 33 | SET 34 | geotype = 'location' 35 | WHERE 36 | user_id = '${Member.id}' 37 | ;`); 38 | let location_keep = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 39 | .setAuthor(Message.member.db.user_name, Message.member.user.displayAvatarURL()) 40 | .setTitle('DM Alerts are now set to location-based.') 41 | .setDescription('You will need to set up locations and set your active location in order to receive DM Alerts.'); 42 | Message.reply(location_keep).then(m => m.delete({ 43 | timeout: 5000 44 | })).catch(console.error); 45 | } 46 | } 47 | 48 | let requestAction = new WDR.DiscordJS.MessageEmbed() 49 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 50 | .setTitle('What would you like to do with your Locations?') 51 | .setDescription('`view` » View your Locations.' + '\n' + 52 | '`set` » Set your Current Location.' + '\n' + 53 | '`create` » Create a Location.' + '\n' + 54 | '`edit` » Edit a Location.' + '\n' + 55 | '`remove` » Remove a Location.') 56 | .setFooter('Type the action, no command prefix required.'); 57 | 58 | Message.channel.send(requestAction).catch(console.error).then(BotMsg => { 59 | return Functions.OptionCollect(WDR, Functions, 'start', Message, BotMsg, Member); 60 | }); 61 | }; 62 | -------------------------------------------------------------------------------- /src/commands/subscription/location/collect_option.js: -------------------------------------------------------------------------------- 1 | module.exports = (WDR, Functions, source, oMessage, bMessage, Member, AreaArray) => { 2 | let BotMsg = bMessage; 3 | let OriginalMsg = oMessage; 4 | 5 | const filter = CollectedMsg => CollectedMsg.author.id == OriginalMsg.author.id; 6 | const collector = OriginalMsg.channel.createMessageCollector(filter, { 7 | time: 60000 8 | }); 9 | 10 | // FILTER COLLECT EVENT 11 | collector.on('collect', CollectedMsg => { 12 | 13 | try { 14 | CollectedMsg.delete(); 15 | // eslint-disable-next-line no-empty 16 | } catch (e) { 17 | 18 | } 19 | 20 | switch (CollectedMsg.content.toLowerCase()) { 21 | case 'create': 22 | collector.stop('create'); 23 | break; 24 | case 'remove': 25 | collector.stop('remove'); 26 | break; 27 | case 'edit': 28 | collector.stop('edit'); 29 | break; 30 | case 'set': 31 | collector.stop('set'); 32 | break; 33 | case 'view': 34 | collector.stop('view'); 35 | break; 36 | } 37 | }); 38 | 39 | // COLLECTOR HAS BEEN ENDED 40 | collector.on('end', (_collected, msg) => { 41 | 42 | if (BotMsg && BotMsg.channel.type != 'dm') { 43 | try { 44 | BotMsg.delete(); 45 | // eslint-disable-next-line no-empty 46 | } catch (e) { 47 | 48 | } 49 | } 50 | 51 | switch (msg) { 52 | case 'create': 53 | return Functions.Create(WDR, Functions, OriginalMsg, Member, AreaArray); 54 | case 'remove': 55 | return Functions.Remove(WDR, Functions, OriginalMsg, Member, AreaArray); 56 | case 'edit': 57 | return Functions.Modify(WDR, Functions, OriginalMsg, Member, AreaArray); 58 | case 'set': 59 | return Functions.Set(WDR, Functions, OriginalMsg, Member, AreaArray); 60 | case 'view': 61 | return Functions.View(WDR, Functions, OriginalMsg, Member, AreaArray); 62 | case 'end': 63 | return; 64 | case 'time': 65 | if (source != 'complete') { 66 | return Functions.TimedOut(WDR, Functions, OriginalMsg, Member); 67 | } 68 | return null; 69 | default: 70 | return null; 71 | } 72 | }); 73 | 74 | // END 75 | return; 76 | }; -------------------------------------------------------------------------------- /src/commands/subscription/location/lset.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/src/commands/subscription/location/lset.js -------------------------------------------------------------------------------- /src/commands/subscription/location/preset.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/src/commands/subscription/location/preset.js -------------------------------------------------------------------------------- /src/commands/subscription/lset.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/src/commands/subscription/lset.js -------------------------------------------------------------------------------- /src/commands/subscription/pause.js: -------------------------------------------------------------------------------- 1 | module.exports = async (WDR, Message) => { 2 | let query = ` 3 | UPDATE 4 | wdr_users 5 | SET 6 | pokemon_status = 0, 7 | pvp_status = 0, 8 | quest_status = 0, 9 | raid_status = 0, 10 | lure_status = 0, 11 | invasion_status = 0 12 | WHERE 13 | user_id = ${Message.member.id} 14 | ;`; 15 | WDR.UpdateAllSubTables(WDR, `UPDATE %TABLE% SET status = 0 WHERE user_id = ${Message.member.id}`); 16 | WDR.wdrDB.query( 17 | query, 18 | function (error) { 19 | if (error) { 20 | WDR.Console.error(WDR, '[commands/subscriptions/pause.js] Error Resuming Subscriptions.', [query, error]); 21 | return Message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete({ 22 | timeout: 5000 23 | })).catch(console.error); 24 | } else { 25 | let now_active = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 26 | .setAuthor(Message.member.db.user_name, Message.member.user.displayAvatarURL()) 27 | .setTitle('Your Subscriptions are all now **Paused**.'); 28 | return Message.reply(now_active).then(m => m.delete({ 29 | timeout: 5000 30 | })).catch(console.error); 31 | } 32 | } 33 | ); 34 | }; -------------------------------------------------------------------------------- /src/commands/subscription/pokemon/begin.js: -------------------------------------------------------------------------------- 1 | var Functions = { 2 | Cancel: require(__dirname + '/../cancel.js'), 3 | Create: require(__dirname + '/create.js'), 4 | DetailCollect: require(__dirname + '/collect_detail.js'), 5 | Modify: require(__dirname + '/modify.js'), 6 | OptionCollect: require(__dirname + '/collect_option.js'), 7 | Preset: require(__dirname + '/preset.js'), 8 | Remove: require(__dirname + '/remove.js'), 9 | Status: require(__dirname + '/status.js'), 10 | TimedOut: require(__dirname + '/../timedout.js'), 11 | View: require(__dirname + '/view.js'), 12 | Dir: __filename.split('/').slice(__dirname.split('/').length - 4).join('/') 13 | }; 14 | 15 | module.exports = async (WDR, Message) => { 16 | 17 | let Member = Message.member ? Message.member : Message.author; 18 | 19 | let request_action = new WDR.DiscordJS.MessageEmbed() 20 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 21 | .setTitle('What would you like to do with your Pokémon Subscriptions?') 22 | .setDescription('`presets` » View quick preset subscriptions.' + '\n' + 23 | '`view` » View your Subscriptions.' + '\n' + 24 | '`add` » Create a Simple Subscription.' + '\n' + 25 | '`add adv` » Create an Advanced Subscription.' + '\n' + 26 | '`remove` » Remove a Pokémon Subscription.' + '\n' + 27 | '`edit` » Edit a Subscription.' + '\n' + 28 | '`pause` or `resume` » Pause/Resume Pokémon Subscriptions Only.') 29 | .setFooter('Type the action, no command prefix required.'); 30 | 31 | Message.channel.send(request_action).catch(console.error).then(BotMsg => { 32 | return Functions.OptionCollect(WDR, Functions, 'start', Message, BotMsg, Member); 33 | }); 34 | }; -------------------------------------------------------------------------------- /src/commands/subscription/pvp/begin.js: -------------------------------------------------------------------------------- 1 | var Functions = { 2 | Cancel: require(__dirname + '/../cancel.js'), 3 | Create: require(__dirname + '/create.js'), 4 | DetailCollect: require(__dirname + '/collect_detail.js'), 5 | Modify: require(__dirname + '/modify.js'), 6 | OptionCollect: require(__dirname + '/collect_option.js'), 7 | Preset: require(__dirname + '/preset.js'), 8 | Remove: require(__dirname + '/remove.js'), 9 | Status: require(__dirname + '/status.js'), 10 | TimedOut: require(__dirname + '/../timedout.js'), 11 | View: require(__dirname + '/view.js'), 12 | Dir: __filename.split('/').slice(__dirname.split('/').length - 4).join('/') 13 | }; 14 | 15 | module.exports = async (WDR, Message) => { 16 | 17 | let Member = Message.member ? Message.member : Message.author; 18 | 19 | let request_action = new WDR.DiscordJS.MessageEmbed() 20 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 21 | .setTitle('What would you like to do with your PvP Subscriptions?') 22 | .setDescription('`presets` » View quick preset subscriptions.' + '\n' + 23 | '`view` » View your Subscriptions.' + '\n' + 24 | '`add` » Create a Simple Subscription.' + '\n' + 25 | '`remove` » Remove a pokemon Subscription.' + '\n' + 26 | '`edit` » Edit a Subscription.' + '\n' + 27 | '`pause` or `resume` » Pause/Resume PvP subscriptions Only.') 28 | .setFooter('Type the action, no command prefix required.'); 29 | 30 | Message.channel.send(request_action).then(BotMsg => { 31 | return Functions.OptionCollect(WDR, Functions, 'start', Message, BotMsg, Member); 32 | }); 33 | }; -------------------------------------------------------------------------------- /src/commands/subscription/pvp/status.js: -------------------------------------------------------------------------------- 1 | module.exports = (WDR, Functions, Message, Member, reason) => { 2 | WDR.wdrDB.query(` 3 | SELECT 4 | * 5 | FROM 6 | wdr_users 7 | WHERE 8 | user_id = '${Member.id}' 9 | AND 10 | guild_id = '${Message.guild.id}' 11 | ;`, 12 | async function (error) { 13 | if(error){ 14 | WDR.Console.error(WDR, '[cmd/sub/pvp/status.js] Unable to user' , [error]); 15 | } 16 | if (Member.db.pvp_status == 1 && reason == 'resume') { 17 | let already_active = new WDR.DiscordJS.MessageEmbed().setColor('ff0000') 18 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 19 | .setTitle('Your PvP subscriptions are already **Active**!') 20 | .setFooter('You can type \'view\', \'presets\', \'add\', \'remove\', or \'edit\'.'); 21 | Message.channel.send(already_active).catch(console.error).then(nMessage => { 22 | return Functions.OptionCollect(WDR, Functions, 'view', Message, nMessage, Member); 23 | }); 24 | } else if (Member.db.pvp_status === 0 && reason == 'pause') { 25 | let already_paused = new WDR.DiscordJS.MessageEmbed().setColor('ff0000') 26 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 27 | .setTitle('Your PvP subscriptions are already **Paused**!') 28 | .setFooter('You can type \'view\', \'presets\', \'add\', \'remove\', or \'edit\'.'); 29 | Message.channel.send(already_paused).catch(console.error).then(nMessage => { 30 | return Functions.OptionCollect(WDR, Functions, 'view', Message, nMessage, Member); 31 | }); 32 | } else { 33 | let change; 34 | if (reason == 'pause') { 35 | change = 0; 36 | } else if (reason == 'resume') { 37 | change = 1; 38 | } 39 | WDR.UpdateAllSubTables(WDR, `UPDATE %TABLE% SET status = ${change} WHERE user_id = '${Member.id}' AND guild_id = '${Message.guild.id}' ;`); 40 | WDR.wdrDB.query(` 41 | UPDATE 42 | wdr_users 43 | SET 44 | pvp_status = ${change} 45 | WHERE 46 | user_id = '${Member.id}' 47 | AND 48 | guild_id = '${Message.guild.id} 49 | ;'`, 50 | async function (error) { 51 | if (error) { 52 | WDR.Console.error(WDR, '[cmd/pvp/remove.js] Error Inserting Subscription.', [error]); 53 | return Message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete({ 54 | timeout: 10000 55 | })); 56 | } else { 57 | let subscription_success = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 58 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 59 | .setTitle('Your Pokémon Subscriptions have been set to `' + change + '`!') 60 | .setFooter('Saved to the subscription Database.'); 61 | return Message.channel.send(subscription_success).then(m => m.delete({ 62 | timeout: 5000 63 | })); 64 | } 65 | } 66 | ); 67 | } 68 | } 69 | ); 70 | }; -------------------------------------------------------------------------------- /src/commands/subscription/quest/begin.js: -------------------------------------------------------------------------------- 1 | var Functions = { 2 | Cancel: require(__dirname + '/../cancel.js'), 3 | Create: require(__dirname + '/create.js'), 4 | DetailCollect: require(__dirname + '/collect_detail.js'), 5 | OptionCollect: require(__dirname + '/collect_option.js'), 6 | Preset: require(__dirname + '/preset.js'), 7 | Remove: require(__dirname + '/remove.js'), 8 | Status: require(__dirname + '/status.js'), 9 | TimedOut: require(__dirname + '/../timedout.js'), 10 | View: require(__dirname + '/view.js'), 11 | Dir: __filename.split('/').slice(__dirname.split('/').length - 4).join('/') 12 | }; 13 | 14 | module.exports = async (WDR, Message) => { 15 | 16 | let Member = Message.member ? Message.member : Message.author; 17 | 18 | let request_action = new WDR.DiscordJS.MessageEmbed() 19 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 20 | .setTitle('What would you like to do with your Quest Subscriptions?') 21 | .setDescription('`presets` » View quick preset subscriptions.' + '\n' + 22 | '`view` » View your Subscriptions.\n' + 23 | '`add` » Create an Alert.\n' + 24 | '`remove` » Remove a Quest Subscription.\n' + 25 | '`pause` or `resume` » Pause/Resume Quest Subscriptions Only.') 26 | .setFooter('Type the action, no command prefix required.'); 27 | 28 | Message.channel.send(request_action).catch(console.error).then(BotMsg => { 29 | return Functions.OptionCollect(WDR, Functions, 'start', Message, BotMsg, Member); 30 | }); 31 | }; -------------------------------------------------------------------------------- /src/commands/subscription/quest/collect_option.js: -------------------------------------------------------------------------------- 1 | module.exports = (WDR, Functions, source, oMessage, bMessage, Member) => { 2 | 3 | let BotMsg = bMessage; 4 | let OriginalMsg = oMessage; 5 | 6 | const filter = CollectedMsg => CollectedMsg.author.id == OriginalMsg.author.id; 7 | const collector = OriginalMsg.channel.createMessageCollector(filter, { 8 | time: 60000 9 | }); 10 | 11 | collector.on('collect', CollectedMsg => { 12 | 13 | try { 14 | CollectedMsg.delete(); 15 | // eslint-disable-next-line no-empty 16 | } catch (e) { 17 | 18 | } 19 | 20 | let input = CollectedMsg.content.split(' ')[0].toString().toLowerCase(); 21 | 22 | let add_words = ['ad', 'add', 'create'], 23 | preset_words = ['preset', 'presets'], 24 | remove_words = ['remove', 'rm'], 25 | view_words = ['view', 'vw', 'veiw', 'viw', 'vew'], 26 | pause_words = ['puase', 'pasue', 'pasue', 'psaue', 'paus', 'pause'], 27 | resume_words = ['resum', 'rseume', 'reusme', 'resuem', 'resume']; 28 | 29 | switch (true) { 30 | case add_words.some(word => input.includes(word)): 31 | collector.stop('add'); 32 | break; 33 | 34 | case preset_words.some(word => input.includes(word)): 35 | collector.stop('preset'); 36 | break; 37 | 38 | case remove_words.some(word => input.includes(word)): 39 | collector.stop('remove'); 40 | break; 41 | 42 | case view_words.some(word => input.includes(word)): 43 | collector.stop('view'); 44 | break; 45 | 46 | case pause_words.some(word => input.includes(word)): 47 | collector.stop('pause'); 48 | break; 49 | 50 | case resume_words.some(word => input.includes(word)): 51 | collector.stop('resume'); 52 | break; 53 | } 54 | }); 55 | 56 | collector.on('end', (collected, arg) => { 57 | 58 | try { 59 | BotMsg.delete(); 60 | // eslint-disable-next-line no-empty 61 | } catch (e) { 62 | 63 | } 64 | 65 | switch (arg) { 66 | case 'cancel': 67 | return Functions.Cancel(WDR, Functions, OriginalMsg, Member); 68 | case 'add': 69 | return Functions.Create(WDR, Functions, OriginalMsg, Member); 70 | case 'preset': 71 | return Functions.Preset(WDR, Functions, OriginalMsg, Member); 72 | case 'remove': 73 | return Functions.Remove(WDR, Functions, OriginalMsg, Member); 74 | case 'view': 75 | return Functions.View(WDR, Functions, OriginalMsg, Member); 76 | case 'resume': 77 | case 'pause': 78 | return Functions.Status(WDR, Functions, OriginalMsg, Member, arg); 79 | case 'time': 80 | if (source != 'complete') { 81 | return Functions.TimedOut(WDR, Functions, OriginalMsg, Member); 82 | } 83 | return null; 84 | default: 85 | return null; 86 | } 87 | }); 88 | 89 | // END 90 | return; 91 | }; -------------------------------------------------------------------------------- /src/commands/subscription/quest/view.js: -------------------------------------------------------------------------------- 1 | module.exports = (WDR, Functions, Message, Member) => { 2 | WDR.wdrDB.query(` 3 | SELECT 4 | * 5 | FROM 6 | wdr_quest_subs 7 | WHERE 8 | user_id = '${Member.id}' 9 | AND 10 | guild_id = ${Message.guild.id} 11 | ;`, 12 | async function(error, subscriptions) { 13 | if (error) { 14 | WDR.Console.error(WDR, '[src/sub/cmd/quest/create.js] Error Fetching Subscriptions to Create Subscription.', [error]); 15 | return Message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete({ 16 | timeout: 10000 17 | })); 18 | } else if (!subscriptions || subscriptions.length < 1) { 19 | let no_subscriptions = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 20 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 21 | .setTitle('You do not have any Quest Subscriptions!') 22 | .setFooter('You can type \'view\', \'presets\', \'add\', or \'remove\'.'); 23 | Message.channel.send(no_subscriptions).catch(console.error).then(BotMsg => { 24 | return Functions.OptionCollect(WDR, Functions, 'view', Message, BotMsg, Member); 25 | }); 26 | 27 | } else { 28 | let sub_list = ''; 29 | for (let s = 0, slen = subscriptions.length; s < slen; s++) { 30 | let choice = s + 1; 31 | let sub_data = subscriptions[s]; 32 | sub_list += '**' + choice + ' - ' + sub_data.reward + '**\n'; 33 | if(sub_data.geotype !== 'city'){ 34 | if(sub_data.geotype === 'location'){ 35 | sub_list += ' ' + 'Area: ' + '`' + JSON.parse(sub_data.location).name + '`'; 36 | } else { 37 | sub_list += ' ' + 'Area: ' + '`' + sub_data.areas + '`' + '\n'; 38 | } 39 | } else { 40 | sub_list += ' ' + 'Area: ' + '`All`'+ '\n'; 41 | } 42 | sub_list += '\n'; 43 | } 44 | sub_list = sub_list.slice(0, -1); 45 | 46 | let o_status = Member.db.status === 1 ? 'Enabled' : 'Disabled'; 47 | let r_status = Member.db.quest_status === 1 ? 'Enabled' : 'Disabled'; 48 | let questSubs = new WDR.DiscordJS.MessageEmbed() 49 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 50 | .setTitle('Your Quest Subscriptions') 51 | .setDescription('Overall Status: `' + o_status + '`\n' + 52 | 'Quest Status: `' + r_status + '`\n\n' + sub_list) 53 | .setFooter('You can type \'view\', \'presets\', \'add\', or \'remove\'.'); 54 | Message.channel.send(questSubs).catch(console.error).then(BotMsg => { 55 | return Functions.OptionCollect(WDR, Functions, 'complete', Message, BotMsg, Member); 56 | }); 57 | } 58 | } 59 | ); 60 | }; 61 | -------------------------------------------------------------------------------- /src/commands/subscription/raid/begin.js: -------------------------------------------------------------------------------- 1 | var Functions = { 2 | Cancel: require(__dirname + '/../cancel.js'), 3 | Create: require(__dirname + '/create.js'), 4 | DetailCollect: require(__dirname + '/collect_detail.js'), 5 | MatchCollect: require(__dirname + '/collect_match.js'), 6 | OptionCollect: require(__dirname + '/collect_option.js'), 7 | Preset: require(__dirname + '/preset.js'), 8 | Remove: require(__dirname + '/remove.js'), 9 | Status: require(__dirname + '/status.js'), 10 | TimedOut: require(__dirname + '/../timedout.js'), 11 | View: require(__dirname + '/view.js'), 12 | Dir: __filename.split('/').slice(__dirname.split('/').length - 4).join('/') 13 | }; 14 | 15 | module.exports = async (WDR, Message) => { 16 | 17 | let Member = Message.member ? Message.member : Message.author; 18 | 19 | let gym_name_array = []; 20 | let gym_detail_array = []; 21 | 22 | let gym_collection = new WDR.DiscordJS.Collection(); 23 | 24 | for (let ga = 0, galen = WDR.Gym_Array.length; ga < galen; ga++) { 25 | let gym = WDR.Gym_Array[ga]; 26 | if (WDR.PointInGeoJSON.polygon(Message.discord.geofence, [gym.lon, gym.lat])) { 27 | let area = await WDR.Get_Areas(WDR, { 28 | latitude: gym.lat, 29 | longitude: gym.lon, 30 | discord: Message.discord, 31 | area: {} 32 | }); 33 | let gym_name = ''; 34 | if (area.sub) { 35 | gym_name = gym.name + ' [' + area.sub + ' - ' + gym.lat + ',' + gym.lon + ']'; 36 | } else if (area.main) { 37 | gym_name = gym.name + ' [' + area.main + ' - ' + gym.lat + ',' + gym.lon + ']'; 38 | } else { 39 | gym_name = gym.name + ' [' + gym.lat + ',' + gym.lon + ']'; 40 | } 41 | gym_name_array.push(gym.name); 42 | gym_detail_array.push(gym_name); 43 | gym_collection.set(gym.name, gym); 44 | } 45 | } 46 | 47 | let request_action = new WDR.DiscordJS.MessageEmbed() 48 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 49 | .setTitle('What would you like to do with your Raid Subscriptions?') 50 | .setDescription('`presets` » View quick preset subscriptions.' + '\n' + 51 | '`view` » View your Subscriptions.\n' + 52 | '`add` » Create a Simple Subscription.\n' + 53 | '`remove` » Remove a Raid Subscription.\n' + 54 | '`pause` or `resume` » Pause/Resume Raid Subscriptions Only.') 55 | .setFooter('Type the action, no command prefix required.'); 56 | 57 | Message.channel.send(request_action).catch(console.error).then(BotMsg => { 58 | return Functions.OptionCollect(WDR, Functions, 'start', Message, BotMsg, Member, gym_name_array, gym_detail_array, gym_collection); 59 | }); 60 | }; -------------------------------------------------------------------------------- /src/commands/subscription/resume.js: -------------------------------------------------------------------------------- 1 | module.exports = async (WDR, Message) => { 2 | WDR.UpdateAllSubTables(WDR, `UPDATE %TABLE% SET status = 1 WHERE user_id = '${Message.member.id}' AND guild_id = '${Message.guild.id}'`); 3 | let query = ` 4 | UPDATE 5 | wdr_users 6 | SET 7 | status = 1, 8 | pokemon_status = 1, 9 | pvp_status = 1, 10 | quest_status = 1, 11 | raid_status = 1, 12 | lure_status = 1, 13 | invasion_status = 1 14 | WHERE 15 | user_id = '${Message.member.id}' 16 | AND 17 | guild_id = '${Message.guild.id}' 18 | ;`; 19 | WDR.wdrDB.query( 20 | query, 21 | function (error) { 22 | if (error) { 23 | WDR.Console.error(WDR, '[commands/subscriptions/resume.js] Error Resuming Subscriptions.', [query, error]); 24 | return Message.reply('There has been an error, please contact an Admin to fix.').then(m => m.delete({ 25 | timeout: 5000 26 | })).catch(console.error); 27 | } else { 28 | let already_active = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 29 | .setAuthor(Message.member.db.user_name, Message.member.user.displayAvatarURL()) 30 | .setTitle('Your Subscriptions are all now **Active**.'); 31 | return Message.reply(already_active).then(m => m.delete({ 32 | timeout: 5000 33 | })).catch(console.error); 34 | } 35 | } 36 | ); 37 | }; -------------------------------------------------------------------------------- /src/commands/subscription/timedout.js: -------------------------------------------------------------------------------- 1 | module.exports = (WDR, Functions, Message, Member, type) => { 2 | if (!type) { 3 | let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 4 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 5 | .setTitle('Your Subscription Has Timed Out.') 6 | .setDescription('Nothing has been Saved.'); 7 | return Message.reply(subscription_cancel).then(m => m.delete({ 8 | timeout: 10000 9 | })).catch(console.error); 10 | } else { 11 | let subscription_cancel = new WDR.DiscordJS.MessageEmbed().setColor('00ff00') 12 | .setAuthor(Member.db.user_name, Member.user.displayAvatarURL()) 13 | .setTitle('Your ' + type + ' Subscription Has Timed Out.') 14 | .setDescription('Nothing has been Saved.'); 15 | return Message.reply(subscription_cancel).then(m => m.delete({ 16 | timeout: 10000 17 | })).catch(console.error); 18 | } 19 | }; -------------------------------------------------------------------------------- /src/events/channelCreate.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | 3 | module.exports = async (BOT, channel) => { 4 | if (!channel.guild) { 5 | return; 6 | } 7 | let config = BOT.Configs.get(channel.guild.id); 8 | if (!config) { 9 | return; 10 | } 11 | setTimeout(function() { 12 | if (!channel.guild) { 13 | return; 14 | } 15 | let config = BOT.Configs.get(channel.guild.id); 16 | if (!config) { 17 | return; 18 | } 19 | let index = config.channels.indexOf(channel.id); 20 | if (index >= 0) { 21 | return; 22 | } 23 | let channels = config.channels + ',' + channel.id; 24 | BOT.sql.query('UPDATE `' + channel.guild.id + '` SET channels = ? LIMIT 1', [channels], function(error) { 25 | if (error) { 26 | return console.error('[ChannelCreate]', error); 27 | } 28 | if (config.log_server_state === 'ENABLED') { 29 | let channelCreated = new Discord.MessageEmbed().setColor('96f644') 30 | .setTitle('#' + channel.name + ' Channel Created') 31 | .setFooter(BOT.time(config.timezone)); 32 | return BOT.channels.cache.get(config.log_server_channel).send(channelCreated).catch(error => { 33 | console.error('[ChannelCreate]', error); 34 | }); 35 | } 36 | }); 37 | return; 38 | }, 500); 39 | }; -------------------------------------------------------------------------------- /src/events/channelDelete.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | 3 | module.exports = async (BOT, channel) => { 4 | let config = BOT.Configs.get(channel.guild.id); 5 | if (!config) { 6 | return; 7 | } 8 | setTimeout(function() { 9 | let config = BOT.Configs.get(channel.guild.id); 10 | if (!config) { 11 | return; 12 | } 13 | let index = config.channels.indexOf(channel.id); 14 | let channels = config.channels.split(','); 15 | if (index >= 0) { 16 | channels.splice(channel.id, 1); 17 | } 18 | if (channel.name == 'beer_lounge') { 19 | channel.guild.createChannel('beer_lounge', 'text') 20 | .then(beer_channel => { 21 | beer_channel.setParent('360971911225933836').then(beer_channel => { 22 | beer_channel.overwritePermissions(channel.guild.id, { 23 | 'READ_MESSAGES': false 24 | }).then(beer_channel => { 25 | beer_channel.overwritePermissions('478969731983081492', { 26 | 'READ_MESSAGES': true 27 | }); 28 | }); 29 | }); 30 | }); 31 | } 32 | channels = channels.toString(); 33 | BOT.sql.query('UPDATE `' + channel.guild.id + '` SET channels = ? LIMIT 1', [channels], function(error) { 34 | if (error) { 35 | return console.error('[ChannelDelete]', error); 36 | } 37 | if (config.log_server_state === 'ENABLED') { 38 | let channelDeleted = new Discord.MessageEmbed().setColor('ffc700') 39 | .setTitle('💥 #' + channel.name + ' Channel Destroyed') 40 | .setFooter(BOT.time(config.timezone)); 41 | return BOT.channels.cache.get(config.log_server_channel).send(channelDeleted).catch(error => { 42 | console.error('[ChannelDelete]', error); 43 | }); 44 | } 45 | }); 46 | }, 500); 47 | return; 48 | }; -------------------------------------------------------------------------------- /src/events/guildMemberAdd.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | 3 | module.exports = async (BOT, member) => { 4 | let config = BOT.Configs.get(member.guild.id); 5 | if (!config) { 6 | return; 7 | } 8 | let MessageEmbed, reason; 9 | if (!config) { 10 | return; 11 | } 12 | 13 | // ASSIGN ANY ACTIVE TEMPORARY ROLES THEY HAVE 14 | BOT.sql.query(`SELECT * FROM temporary_roles WHERE user_id='${member.id}'`), 15 | function(error, rows) { 16 | if (error) { 17 | return console.error('[GuildMemberAdd]', error); 18 | } 19 | if (rows) { 20 | reason = 'TRA,' + BOT.user.tag; 21 | for (let x = 0; x < rows.length; x++) { 22 | let role = member.guild.donorRoles.cache.find(role => role.name === rows[x].temporary_role); 23 | member.roles.add(role, reason).catch(error => { 24 | console.error('[GuildMemberAdd]', error); 25 | }); 26 | } 27 | } 28 | }; 29 | 30 | // ASSIGN THE DEFAULT ROLE 31 | if (config.default_role) { 32 | let role = member.guild.donorRoles.cache.find(role => role.name === config.default_role); 33 | member.roles.add(role).catch(error => { 34 | console.error('[GuildMemberAdd]', error); 35 | }); 36 | } 37 | 38 | 39 | if (config.member_count_channel) { 40 | let channel = BOT.channels.cache.get(config.member_count_channel); 41 | channel.setName('Members: ' + member.guild.memberCount); 42 | } 43 | 44 | // POST A WELCOME MESSAGE 45 | if (config.welcome_message && config.welcome_channel) { 46 | console.log('SAW WELCOME CONFIG'); 47 | let welcomeMsg = config.welcome_message.replace(/%USER%/g, member); 48 | return BOT.channels.cache.get(config.welcome_channel).send(welcomeMsg).catch(error => { 49 | console.error('[GuildMemberAdd]', error); 50 | }); 51 | } 52 | 53 | // LOG THE USER JOIN 54 | if (config.log_server_state === 'ENABLED') { 55 | MessageEmbed = new Discord.MessageEmbed().setColor('00ff00') 56 | .setAuthor(member.user.username + ' (' + member.id + ')', member.user.displayAvatarURL) 57 | .addField('Member Joined', '<@' + member.id + '>', true) 58 | .setFooter(BOT.time(config.timezone)); 59 | return BOT.channels.cache.get(config.log_server_channel).send(MessageEmbed).catch(error => { 60 | console.error('[GuildMemberAdd]', error); 61 | }); 62 | } 63 | 64 | return; 65 | }; -------------------------------------------------------------------------------- /src/events/memberUpdate.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/src/events/memberUpdate.js -------------------------------------------------------------------------------- /src/events/message.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/src/events/message.js -------------------------------------------------------------------------------- /src/events/raw.js: -------------------------------------------------------------------------------- 1 | module.exports = (BOT, event) => { 2 | if (!event.d || !event.t) { 3 | return; 4 | } 5 | let config = BOT.Configs.get(event.d.guild_id); 6 | if (!config) { 7 | return; 8 | } 9 | switch (true) { 10 | case event.t == null: 11 | return; 12 | case event.d.user_id == BOT.ID: 13 | return; 14 | case event.t == 'MESSAGE_REACTION_ADD': 15 | return BOT.emit('messageReactionAdd', event); 16 | case event.t == 'MESSAGE_REACTION_REMOVE': 17 | return BOT.emit('messageReactionRemove', event); 18 | default: 19 | return; 20 | } 21 | }; -------------------------------------------------------------------------------- /src/events/reactions.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PartTimeJS/WDR/603156459ceb48b0f818c3b6d3279e1c6999941f/src/events/reactions.js -------------------------------------------------------------------------------- /src/events/roleCreate.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-unused-vars */ 2 | const Discord = require('discord.js'); 3 | 4 | module.exports = async (BOT, role) => { 5 | let config = BOT.Configs.get(role.guild.id); 6 | if (!config) { 7 | return; 8 | } 9 | role.guild.fetchAuditLogs({ 10 | limit: 1, 11 | type: 24 12 | }).then(auditLog => { 13 | auditLog.entries.map(log => { 14 | let role_embed = new Discord.MessageEmbed().setColor('cc66ff') 15 | .setTitle('🛠 **' + role.name + ' Role Created**') 16 | .setFooter(BOT.time(config.timezone)); 17 | return BOT.channels.cache.get(config.log_server_channel).send(role_embed).catch(error => { 18 | console.error('[RoleCreate]', error); 19 | }); 20 | }); 21 | }); 22 | return; 23 | }; -------------------------------------------------------------------------------- /src/events/roleDelete.js: -------------------------------------------------------------------------------- 1 | module.exports = async (BOT, role) => { 2 | let config = BOT.Configs.get(role.guild.id); 3 | if (!config) { 4 | return; 5 | } 6 | return; 7 | }; -------------------------------------------------------------------------------- /src/events/roleUpdate.js: -------------------------------------------------------------------------------- 1 | module.exports = async (BOT, role) => { 2 | let config = BOT.Configs.get(role.guild.id); 3 | if (!config) { 4 | return; 5 | } 6 | return; 7 | }; -------------------------------------------------------------------------------- /src/events/userUpdate.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | 3 | module.exports = async (BOT, oldUser, newUser) => { 4 | BOT.guilds.cache.map(guild => { 5 | let member = guild.members.cache.get(newUser.id), 6 | uName = ''; 7 | if (member) { 8 | let config = BOT.Configs.get(member.guild.id); 9 | if (!config) { 10 | return; 11 | } 12 | if (member.nickname) { 13 | uName = member.nickname; 14 | } else { 15 | uName = member.user.username; 16 | } 17 | if (config.log_user_state === 'ENABLED' && newUser.id != BOT.ID) { 18 | switch (true) { 19 | case oldUser.username != newUser.username: 20 | var usernameChange = new Discord.MessageEmbed().setColor('cc33ff') 21 | .setAuthor(uName + ' (' + newUser.id + ')', newUser.displayAvatarURL) 22 | .setTitle('✏ **Username Changed**') 23 | .addField('Old Username:', oldUser.tag, true) 24 | .addField('New Username:', newUser.tag, true) 25 | .setFooter(BOT.time(config.timezone)); 26 | return BOT.channels.cache.get(config.log_user_channel).send(usernameChange).catch(error => { 27 | console.error('[UserUpdate]', error); 28 | }); 29 | case oldUser.displayAvatarURL != newUser.displayAvatarURL: 30 | var avatarChange = new Discord.MessageEmbed().setColor('0050ff') 31 | .setAuthor(uName + ' (' + newUser.id + ')', newUser.displayAvatarURL) 32 | .setTitle('📷 **Avatar Changed**') 33 | .setImage(newUser.displayAvatarURL) 34 | .setFooter(BOT.time(config.timezone)); 35 | return BOT.channels.cache.get(config.log_user_channel).send(avatarChange).catch(error => { 36 | console.error('[UserUpdate]', error); 37 | }); 38 | default: 39 | return; 40 | } 41 | } 42 | } 43 | }); 44 | return; 45 | }; -------------------------------------------------------------------------------- /src/functions/CalculateCP.js: -------------------------------------------------------------------------------- 1 | module.exports = async (WDR, pokemonID, formID, attack, defense, stamina, level) => { 2 | let CP = 0; 3 | let pokemonAttack = 0, 4 | pokemonDefense = 0, 5 | pokemonStamina = 0; 6 | let CPMultiplier = WDR.cp_multiplier[level]; 7 | 8 | if (!WDR.Master.pokemon[pokemonID]) { 9 | return WDR.Console.error('[src/pvp.js] Can\'t find Pokemon ID: ' + pokemonID + ' Form:' + formID); 10 | } 11 | if (!WDR.Master.pokemon[pokemonID].attack) { 12 | if (!WDR.Master.pokemon[pokemonID].forms[formID] || !WDR.Master.pokemon[pokemonID].forms[formID].attack) { 13 | return WDR.Console.error('[src/pvp.js] Can\'t find attack of Pokemon ID: ' + pokemonID + ' Form:' + formID); 14 | } 15 | pokemonAttack = WDR.Master.pokemon[pokemonID].forms[formID].attack; 16 | pokemonDefense = WDR.Master.pokemon[pokemonID].forms[formID].defense; 17 | pokemonStamina = WDR.Master.pokemon[pokemonID].forms[formID].stamina; 18 | } else { 19 | pokemonAttack = WDR.Master.pokemon[pokemonID].attack; 20 | pokemonDefense = WDR.Master.pokemon[pokemonID].defense; 21 | pokemonStamina = WDR.Master.pokemon[pokemonID].stamina; 22 | } 23 | 24 | let attackMultiplier = pokemonAttack + parseInt(attack); 25 | let defenseMultiplier = Math.pow(pokemonDefense + parseInt(defense), .5); 26 | let staminaMultiplier = Math.pow(pokemonStamina + parseInt(stamina), .5); 27 | CPMultiplier = Math.pow(CPMultiplier, 2); 28 | 29 | CP = (attackMultiplier * defenseMultiplier * staminaMultiplier * CPMultiplier) / 10; 30 | 31 | CP = Math.floor(CP); 32 | 33 | //CP floor is 10 34 | if (CP < 10) { 35 | CP = 10; 36 | } 37 | 38 | return CP; 39 | }; -------------------------------------------------------------------------------- /src/functions/Capitalize.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-async-promise-executor */ 2 | module.exports = async (string) => { 3 | return new Promise(async resolve => { 4 | try { 5 | if (!string) { 6 | return resolve(''); 7 | } else if (isNaN(string)) { 8 | string = string.toLowerCase(); 9 | if (string.split(' ').length > 1) { 10 | let processed = ''; 11 | string.split(' ').forEach((word) => { 12 | if(isNaN(word)){ 13 | processed += ' ' + word.charAt(0).toUpperCase() + word.slice(1); 14 | } else { 15 | processed += ' ' + word; 16 | } 17 | }); 18 | return resolve(processed.slice(1)); 19 | } else { 20 | return resolve(string.charAt(0).toUpperCase() + string.slice(1)); 21 | } 22 | } else { 23 | return resolve(''); 24 | } 25 | } catch (e) { 26 | console.error('[functions/Capitalize.js] Error Capitalizing string `' + string + '`', e); 27 | } 28 | }); 29 | }; -------------------------------------------------------------------------------- /src/functions/Console.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | error: function (WDR, err, object) { 3 | console.log(('[WDR ' + WDR.Version + '] [' + WDR.Time(null, 'log') + '] ' + err).bold.brightRed); 4 | if (object) { 5 | if (object.length > 1) { 6 | object.forEach(error => { 7 | console.error(error); 8 | }); 9 | } else { 10 | console.error(object); 11 | } 12 | } 13 | return; 14 | }, 15 | 16 | log: function (WDR, log, object) { 17 | console.log(('[WDR ' + WDR.Version + '] [' + WDR.Time(null, 'log') + '] ' + log).bold.brightGreen); 18 | if (object) { 19 | console.log(object); 20 | } 21 | return; 22 | }, 23 | 24 | info: function (WDR, info, object) { 25 | if (info.includes('[DEBUG]')) { 26 | console.log(('[WDR ' + WDR.Version + '] [' + WDR.Time(null, 'log') + '] ' + info).bold.yellow); 27 | if (object) { 28 | console.log(object); 29 | } 30 | } else { 31 | console.info('[WDR ' + WDR.Version + '] [' + WDR.Time(null, 'log') + '] ' + info); 32 | if (object) { 33 | console.info(object); 34 | } 35 | } 36 | return; 37 | }, 38 | 39 | // custom: function (text, object, color) { 40 | 41 | // } 42 | }; -------------------------------------------------------------------------------- /src/functions/Fetch_JSON.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch'); 2 | 3 | module.exports = async (url) => { 4 | return new Promise(resolve => { 5 | fetch(url) 6 | .then(res => res.json()) 7 | .then(json => { 8 | return resolve(json); 9 | }); 10 | }); 11 | }; -------------------------------------------------------------------------------- /src/functions/Generate_Tile.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-async-promise-executor */ 2 | module.exports = (WDR, object, type, lat, lon, url, url2, zoom) => { 3 | return new Promise(async resolve => { 4 | 5 | if (WDR.Config.TILE_PROVIDER == 'none') { 6 | return resolve(''); 7 | } 8 | 9 | let stops = '', 10 | gyms = '', 11 | post_url = ''; 12 | 13 | if (type != 'location') { 14 | zoom = 15; 15 | //stops = await WDR.Fetch_Stops(WDR, lat, lon); 16 | //Sgyms = await WDR.Fetch_Gyms(WDR, lat, lon); 17 | } 18 | 19 | if (!url2) { 20 | url2 = 'https://raw.githubusercontent.com/PartTimeJS/Assets/master/map/circle_geofence/point.png'; 21 | } 22 | 23 | if (!WDR.Config.TILE_PROVIDER || WDR.Config.TILE_PROVIDER == 'flo') { 24 | post_url = WDR.Config.STATIC_MAP_URL + 'staticmap/' + type + '/?&pregenerate=true®eneratable=true'; 25 | } else { 26 | post_url = WDR.Config.STATIC_MAP_URL + 'staticmap/' + type + '.json'; 27 | } 28 | //stops: stops, 29 | //gyms: gyms 30 | WDR.Axios.post(post_url, { 31 | url: url, 32 | url2: url2, 33 | lat: lat, 34 | lon: lon, 35 | zoom: zoom, 36 | }).then((res) => { 37 | return resolve(res.data); 38 | }).catch(function (error) { 39 | WDR.Console.error(WDR, '[Generate_Tile.js] [Attempt#1] Error Generating Tile. ' + error.response.status + ' - ' + error.response.statusText); 40 | if(WDR.Config.DEBUG.Map_Tiles == 'ENABLED'){ 41 | console.error(error); 42 | } 43 | if (error.response) { 44 | if (url == undefined) { 45 | if(WDR.Config.DEBUG.Map_Tiles == 'ENABLED'){ 46 | console.error('[OBJECT] ', object); 47 | console.log('[SPRITE URL] ', sprite); 48 | } 49 | let sprite = WDR.Get_Sprite(WDR, object); 50 | } 51 | setTimeout(() => { 52 | WDR.Axios.post(post_url, { 53 | url: url, 54 | url2: url2, 55 | lat: lat, 56 | lon: lon, 57 | zoom: zoom, 58 | stops: stops, 59 | gyms: gyms 60 | }).then((res) => { 61 | return resolve(res.data); 62 | }).catch(function (error) { 63 | if(WDR.Config.DEBUG.Map_Tiles == 'ENABLED'){ 64 | WDR.Console.error(WDR, '[Generate_Tile] [Attempt#2] Error Generating Tile. ' + error.response.status + ' - ' + error.response.statusText); 65 | } 66 | }); 67 | }, 30000); 68 | } 69 | return resolve(''); 70 | }); 71 | }); 72 | }; -------------------------------------------------------------------------------- /src/functions/Get_Areas.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-async-promise-executor */ 2 | module.exports = (WDR, object) => { 3 | return new Promise(async resolve => { 4 | 5 | let geofences = await WDR.Geofences.get(object.discord.geojson_file).features; 6 | 7 | if (!geofences) { 8 | WDR.Console.error(WDR, '[Get_Area.js] Geofence configs/geofences/' + object.discord.geojson_file + ' does not appear to exist.'); 9 | } else { 10 | for (let g = 0, glen = geofences.length; g < glen; g++) { 11 | let geojson = geofences[g]; 12 | 13 | if (WDR.PointInGeoJSON.feature({ 14 | features: [geojson] 15 | }, [object.longitude, object.latitude]) != -1) { 16 | if (geojson.properties.sub_area == 'true') { 17 | object.area.sub = geojson.properties.name; 18 | } else { 19 | object.area.main = geojson.properties.name; 20 | } 21 | } 22 | } 23 | return resolve(object.area); 24 | } 25 | }); 26 | }; -------------------------------------------------------------------------------- /src/functions/Get_Distance.js: -------------------------------------------------------------------------------- 1 | module.exports = (WDR, coords) => { 2 | return new Promise(resolve => { 3 | let spawn_loc = { 4 | lat: coords.lat1, 5 | lon: coords.lon1 6 | }; 7 | let user_loc = { 8 | lat: coords.lat2, 9 | lon: coords.lon2 10 | }; 11 | let spawn_distance = WDR.Distance.between(spawn_loc, user_loc); 12 | return resolve(spawn_distance); 13 | }); 14 | }; -------------------------------------------------------------------------------- /src/functions/Get_Gen.js: -------------------------------------------------------------------------------- 1 | module.exports = (ID) => { 2 | return new Promise(resolve => { 3 | switch (true) { 4 | case ID <= 151: 5 | return resolve(1); 6 | case ID <= 251: 7 | return resolve(2); 8 | case ID <= 386: 9 | return resolve(3); 10 | case ID <= 493: 11 | return resolve(4); 12 | case ID <= 649: 13 | return resolve(5); 14 | case ID <= 721: 15 | return resolve(6); 16 | case ID <= 809: 17 | return resolve(7); 18 | default: 19 | return resolve(0); 20 | } 21 | }); 22 | }; -------------------------------------------------------------------------------- /src/functions/Get_Gender.js: -------------------------------------------------------------------------------- 1 | module.exports = (num) => { 2 | return new Promise(resolve => { 3 | switch (num) { 4 | case 1: 5 | return resolve('Male'); 6 | case 2: 7 | return resolve('Female'); 8 | case 4: 9 | return resolve('All'); 10 | default: 11 | return resolve(null); 12 | } 13 | }); 14 | }; -------------------------------------------------------------------------------- /src/functions/Get_Lure.js: -------------------------------------------------------------------------------- 1 | // DETERMINE COLOR FOR EMBED 2 | module.exports = (WDR, lure_id, Lure) => { 3 | switch (lure_id) { 4 | case 501: 5 | return 'Normal'; 6 | case 502: 7 | return 'Glacial'; 8 | case 503: 9 | return 'Mossy'; 10 | case 504: 11 | return 'Magnetic'; 12 | default: 13 | WDR.Console.error(WDR, '[Get_Lure.js] No Lure Type Seen.', Lure); 14 | return null; 15 | } 16 | }; -------------------------------------------------------------------------------- /src/functions/Get_Size.js: -------------------------------------------------------------------------------- 1 | // Get Size of Pokemon BIG Karp/Tiny Rat 2 | module.exports = (WDR, pokemon_id, form_id, pokemon_height, pokemon_weight) => { 3 | return new Promise(resolve => { 4 | let weightRatio = 0, 5 | heightRatio = 0; 6 | if (form_id > 0 && WDR.Master.pokemon[pokemon_id].forms[form_id]) { 7 | let form_weight = WDR.Master.pokemon[pokemon_id].forms[form_id].weight ? WDR.Master.pokemon[pokemon_id].forms[form_id].weight : WDR.Master.pokemon[pokemon_id].weight; 8 | let form_height = WDR.Master.pokemon[pokemon_id].forms[form_id].height ? WDR.Master.pokemon[pokemon_id].forms[form_id].height : WDR.Master.pokemon[pokemon_id].height; 9 | weightRatio = pokemon_weight / form_weight; 10 | heightRatio = pokemon_height / form_height; 11 | } else if (form_id > 0 && !WDR.Master.pokemon[pokemon_id].forms[form_id]) { 12 | WDR.Console.error(WDR, '[functions/Get_Size.js] Missing Form `' + form_id + '` for Pokemon `' + pokemon_id + '`'); 13 | } else { 14 | weightRatio = pokemon_weight / WDR.Master.pokemon[pokemon_id].weight; 15 | heightRatio = pokemon_height / WDR.Master.pokemon[pokemon_id].height; 16 | } 17 | 18 | let size = heightRatio + weightRatio; 19 | 20 | switch (true) { 21 | case size < 1.5: 22 | return resolve('tiny'); 23 | case size <= 1.75: 24 | return resolve('small'); 25 | case size < 2.25: 26 | return resolve('normal'); 27 | case size <= 2.5: 28 | return resolve('large'); 29 | default: 30 | return resolve('big'); 31 | } 32 | }); 33 | }; -------------------------------------------------------------------------------- /src/functions/Get_Type_Color.js: -------------------------------------------------------------------------------- 1 | // DETERMINE COLOR FOR EMBED 2 | module.exports = (type) => { 3 | switch (type.toLowerCase()) { 4 | case 'fairy': 5 | return 'e898e8'; 6 | case 'ghost': 7 | return '705898'; 8 | case 'grass': 9 | return '78c850'; 10 | case 'water': 11 | return '6890f0'; 12 | case 'bug': 13 | return 'a8b820'; 14 | case 'fighting': 15 | return 'c03028'; 16 | case 'electric': 17 | return 'f8d030'; 18 | case 'rock': 19 | return 'b8a038'; 20 | case 'fire': 21 | return 'f08030'; 22 | case 'flying': 23 | return 'a890f0'; 24 | case 'ice': 25 | return '98d8d8'; 26 | case 'ground': 27 | return 'e0c068'; 28 | case 'steel': 29 | return 'b8b8d0'; 30 | case 'dragon': 31 | return '7038f8'; 32 | case 'poison': 33 | return 'a040a0'; 34 | case 'psychic': 35 | return 'f85888'; 36 | case 'dark': 37 | return '705848'; 38 | case 'normal': 39 | return '8a8a59'; 40 | default: 41 | return '232b2b'; 42 | } 43 | }; -------------------------------------------------------------------------------- /src/functions/Get_Weather.js: -------------------------------------------------------------------------------- 1 | module.exports = async (WDR, Object) => { 2 | return new Promise(resolve => { 3 | // GET WEATHER BOOST 4 | switch (Object.weather) { 5 | case 1: 6 | return resolve(WDR.Emotes.clear); 7 | case 2: 8 | return resolve(WDR.Emotes.rain); 9 | case 3: 10 | return resolve(WDR.Emotes.partlyCloudy); 11 | case 4: 12 | return resolve(WDR.Emotes.cloudy); 13 | case 5: 14 | return resolve(WDR.Emotes.windy); 15 | case 6: 16 | return resolve(WDR.Emotes.snow); 17 | case 7: 18 | return resolve(WDR.Emotes.fog); 19 | default: 20 | return resolve(''); 21 | } 22 | }); 23 | }; -------------------------------------------------------------------------------- /src/functions/Pokemon_ID_Search.js: -------------------------------------------------------------------------------- 1 | module.exports = (WDR, name) => { 2 | return new Promise(resolve => { 3 | let PokemonArray = Object.keys(WDR.Master.pokemon).map(i => WDR.Master.pokemon[i].pokedex_id); 4 | for (let p = 0, plen = PokemonArray.length; p < plen; p++) { 5 | let pokemon = WDR.Master.pokemon[PokemonArray[p]]; 6 | if (pokemon.name.toLowerCase().replace(' ','-') == name.toLowerCase()) { 7 | let forms = Object.keys(pokemon.forms).map(f => pokemon.forms[f].form); 8 | if (forms.indexOf('Purified') >= 0) { 9 | forms.splice(forms.indexOf('Purified'), 1); 10 | } 11 | if (forms.indexOf('Shadow') >= 0) { 12 | forms.splice(forms.indexOf('Shadow'), 1); 13 | } 14 | let form_ids = Object.keys(pokemon.forms); 15 | let data = { 16 | id: pokemon.pokedex_id, 17 | name: pokemon.name, 18 | default_form: pokemon.default_form, 19 | forms: forms, 20 | form_ids: form_ids 21 | }; 22 | return resolve(data); 23 | } 24 | } 25 | return resolve(null); 26 | }); 27 | }; -------------------------------------------------------------------------------- /src/functions/Rate_Limit.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-async-promise-executor */ 2 | const rateLimit = {}; 3 | 4 | setInterval(function () { 5 | let users = Object.keys(rateLimit).map(i => rateLimit[i]); 6 | for (let u = 0; u < users.length; u++) { 7 | let user = users[u]; 8 | if (user.count > 0) { 9 | user.count--; 10 | } 11 | } 12 | }, 10000); 13 | 14 | module.exports = (WDR, User) => { 15 | return new Promise(async resolve => { 16 | 17 | if (!rateLimit[User.user_id]) { 18 | rateLimit[User.user_id] = { 19 | user: User.user_id, 20 | name: User.user_name, 21 | paused: false, 22 | count: 0 23 | }; 24 | 25 | } else if (rateLimit[User.user_id].count > 4) { 26 | 27 | 28 | let user_query = ` 29 | UPDATE 30 | wdr_users 31 | SET 32 | status = 0, 33 | pokemon_status = 0, 34 | pvp_status = 0, 35 | quest_status = 0, 36 | raid_status = 0, 37 | lure_status = 0, 38 | invasion_status = 0 39 | WHERE 40 | user_id = ${User.user_id} 41 | ;`; 42 | WDR.wdrDB.query(user_query); 43 | 44 | WDR.UpdateAllSubTables(WDR, `UPDATE %TABLE% SET status = 0 WHERE user_id = ${User.user_id}`); 45 | 46 | setTimeout(function () { 47 | if (rateLimit[User.user_id].paused === false) { 48 | WDR.Console.error(WDR, '[Rate_Limit.js] User ' + User.user_name + ' (' + User.user_id + ') has exceeded DM rate limits. User has been paused.'); 49 | rateLimit[User.user_id].paused = true; 50 | let embed = new WDR.DiscordJS.MessageEmbed() 51 | .setColor('FF0000') 52 | .setTitle('**Your Subscriptions have been PAUSED.**') 53 | .setDescription('You subscriptions have exceeded DM rate limits. Please modify or remove some subscriptions before re-enabling.') 54 | .setFooter('If you have any questions, contact a community leader or admin.'); 55 | WDR.Bot.Array[User.bot].users.fetch(User.user_id).then(TARGET => { 56 | return TARGET.send(embed).catch(console.error); 57 | }); 58 | } 59 | }, 10000); 60 | 61 | 62 | } else if (rateLimit[User.user_id].count >= 0) { 63 | if (rateLimit[User.user_id].count > 2) { 64 | WDR.Console.error(WDR, '[Rate_Limit.js] User ' + User.user_name + ' (' + User.user_id + ')\'s Subscription DM rate is exceeding 10/minute.'); 65 | } 66 | rateLimit[User.user_id].paused = false; 67 | rateLimit[User.user_id].count++; 68 | } 69 | 70 | return resolve(); 71 | 72 | }); 73 | }; -------------------------------------------------------------------------------- /src/functions/Save_User.js: -------------------------------------------------------------------------------- 1 | const moment = require('moment-timezone'); 2 | const GeoTz = require('geo-tz'); 3 | 4 | module.exports = (WDR, message, server) => { 5 | return new Promise(resolve => { 6 | WDR.wdrDB.query(` 7 | SELECT 8 | * 9 | FROM 10 | wdr_info 11 | ;`, 12 | function (error, info) { 13 | let next_bot = info[0].next_bot, 14 | split = WDR.Config.QUEST.DEFAULT_DELIVERY.split(':'); 15 | if (next_bot == WDR.Bot.Array.length - 1) { 16 | next_bot = 0; 17 | } else { 18 | next_bot++; 19 | } 20 | let alert_time = moment(), 21 | timezone = GeoTz(server.geofence[0][0][1], server.geofence[0][0][0]); 22 | alert_time = moment.tz(alert_time, timezone[0]).set({ 23 | hour: split[0], 24 | minute: split[1], 25 | second: 0, 26 | millisecond: 0 27 | }); 28 | alert_time = moment.tz(alert_time, WDR.Config.timezone).format('HH:mm'); 29 | let user_name = message.member.user.username.replace(/[\W]+/g, ''); 30 | WDR.wdrDB.query(` 31 | INSERT INTO 32 | wdr_users ( 33 | user_id, 34 | user_name, 35 | guild_id, 36 | guild_name, 37 | bot, 38 | status, 39 | geotype, 40 | areas, 41 | quest_time 42 | ) 43 | VALUES ( 44 | ${message.member.id}, 45 | '${user_name}', 46 | ${message.guild.id}, 47 | '${server.name}', 48 | ${next_bot}, 49 | 1, 50 | '${'areas'}', 51 | '${server.name}', 52 | '${alert_time}' 53 | ) 54 | ;`, 55 | async function (error) { 56 | if (error) { 57 | return WDR.Console.error(WDR, '[Save_User] [' + WDR.Time(null, 'stamp') + '] [bot.js] UNABLE TO ADD USER TO wdr_users TABLE', error); 58 | } else { 59 | WDR.wdrDB.query(`UPDATE wdr_info SET next_bot = ${next_bot};`); 60 | WDR.Console.info(WDR, '[Save_User.js] Added ' + message.member.user.tag + ' to the wdr_users Table.'); 61 | return resolve({ 62 | user_id: message.member.id, 63 | user_name: user_name, 64 | guild_id: message.guild.id, 65 | guild_name: server.name, 66 | bot: next_bot, 67 | geotype: 'areas', 68 | areas: server.name, 69 | location: null, 70 | locations: null, 71 | status: 1, 72 | pokemon_status: 1, 73 | raid_status: 1, 74 | quest_status: 1, 75 | pvp_status: 1 76 | }); 77 | } 78 | } 79 | ); 80 | } 81 | ); 82 | return; 83 | }); 84 | }; -------------------------------------------------------------------------------- /src/functions/Send_DM.js: -------------------------------------------------------------------------------- 1 | // CHOOSE NEXT BOT AND SEND EMBED 2 | module.exports = (WDR, guild_id, user_id, embed, bot) => { 3 | if (!WDR.Bot.Array[bot]) { 4 | bot = 0; 5 | } 6 | if (bot) { 7 | WDR.Bot.Array[bot].users.fetch(user_id).then(TARGET => { 8 | return TARGET.send(embed).catch(error => { 9 | if (error.code == 'ECONNRESET') { 10 | return console.error('[Send_DM] [' + WDR.Time(null, 'stamp') + '] [' + user_id + '] Error Code ', error.code); 11 | } else { 12 | return console.error('[Send_DM] [' + WDR.Time(null, 'stamp') + '] [' + user_id + '] [' + WDR.Bot.Array[bot].id + '] ', error); 13 | } 14 | }); 15 | }); 16 | } else { 17 | WDR.Bot.users.fetch(user_id).then(TARGET => { 18 | return TARGET.send(embed).catch(error => { 19 | console.log(error); 20 | if (error.code == 'ECONNRESET') { 21 | return console.error('[Send_DM] [' + WDR.Time(null, 'stamp') + '] [' + user_id + '] Error Code ', error.code); 22 | } else { 23 | return console.error('[Send_DM] [' + WDR.Time(null, 'stamp') + '] [' + user_id + '] [' + WDR.Bot.Array[bot].id + '] ', error); 24 | } 25 | }); 26 | }); 27 | } 28 | }; -------------------------------------------------------------------------------- /src/functions/Send_Embed.js: -------------------------------------------------------------------------------- 1 | // CHOOSE NEXT BOT AND SEND EMBED 2 | var errors = 0; 3 | 4 | var Next_Bot = 0; 5 | 6 | module.exports = (WDR, Embed, channel_id) => { 7 | 8 | if (!WDR.Bot.Array) { 9 | return WDR.Console.error(WDR, '[Send_Embed.js] No Bot Array Available.'); 10 | } 11 | 12 | if (Next_Bot == (WDR.Bot.Array.length - 1)) { 13 | Next_Bot = 0; 14 | } else { 15 | Next_Bot++; 16 | } 17 | 18 | let Bot = WDR.Bot.Array[Next_Bot]; 19 | if (!Bot) { 20 | WDR.Console.error(WDR, '[Send_Embed.js] No Bot found. Next_Bot = ' + Next_Bot + '. Bot_Array length: ' + WDR.Bot.Array.length); 21 | } 22 | 23 | let channel = WDR.Bot.Array[Next_Bot].channels.cache.get(channel_id); 24 | if (!channel) { 25 | errors++; 26 | WDR.Console.error(WDR, '[Send_Embed.js] Problem finding channel: ' + channel_id + ' using Bot: ' + WDR.Bot.Array[Next_Bot].user.id); 27 | if (errors >= 5) { 28 | WDR.Console.error(WDR, '[Send_Embed.js] 5 Channel Errors Seen, Restarting WDR...'); 29 | WDR.restart('Channel Send Errors', 1); 30 | } 31 | } 32 | 33 | channel.send(Embed).catch(error => { 34 | errors++; 35 | if (errors >= 5) { 36 | WDR.Console.error(WDR, '[Send_Embed.js] 5 Channel Errors Seen, Restarting WDR...'); 37 | process.exit(1); 38 | } else { 39 | WDR.Console.error(WDR, '[Send_Embed.js] ' + channel.id, [error.toString()]); 40 | WDR.Console.info(WDR, '[Send_Embed.js] A re-attempt to send the Embed will be made in 10 seconds.', error.toString()); 41 | setTimeout(() => { 42 | channel.send(Embed).catch(error => { 43 | if(error){ 44 | WDR.Console.error(WDR, '[Send_Embed.js] Re-attempt Unsuccessful.', error.toString()); 45 | console.error(Embed); 46 | } else { 47 | WDR.Console.log(WDR, '[Send_Embed.js] Re-attempt Successful.'); 48 | } 49 | }); 50 | }, 10000); 51 | } 52 | 53 | }); 54 | }; 55 | 56 | setInterval(function () { 57 | errors = 0; 58 | }, 60000 * 5); // 5 Minutes -------------------------------------------------------------------------------- /src/handlers/messages.js: -------------------------------------------------------------------------------- 1 | delete require.cache[require.resolve(__dirname + '/../commands/command-admin.js')]; 2 | const Admin_Command = require(__dirname + '/../commands/command-admin.js'); 3 | 4 | delete require.cache[require.resolve(__dirname + '/../commands/command-channel.js')]; 5 | const Channel_Command = require(__dirname + '/../commands/command-channel.js'); 6 | 7 | delete require.cache[require.resolve(__dirname + '/../commands/command-dm.js')]; 8 | const DM_Command = require(__dirname + '/../commands/command-dm.js'); 9 | 10 | delete require.cache[require.resolve(__dirname + '/../commands/command-public.js')]; 11 | const Public_Command = require(__dirname + '/../commands/command-public.js'); 12 | 13 | 14 | 15 | module.exports = async (WDR, message) => { 16 | 17 | if (!message.content.startsWith(WDR.Config.PREFIX)) { 18 | return; 19 | } 20 | 21 | if (message.author.bot == true) { 22 | return; 23 | } 24 | 25 | if (!message.member) { 26 | return; 27 | } 28 | 29 | message.member.isAdmin = message.member.hasPermission('ADMINISTRATOR') ? true : false; 30 | 31 | message.member.isMod = message.member.hasPermission('MANAGE_ROLES') ? true : false; 32 | 33 | if (message.channel.type == 'dm') { 34 | return DM_Command(WDR, message); 35 | 36 | } else { 37 | 38 | message.delete(); 39 | 40 | for(let d = 0, dlen = WDR.Discords.length; d { 4 | 5 | //WDR.Master = require(WDR.Dir + '/static/data/master.json'); 6 | WDR.Master = await WDR.Fetch_JSON('https://raw.githubusercontent.com/WatWowMap/Masterfile-Generator/master/master-latest.json'); 7 | WDR.Master.type_effectiveness = require(WDR.Dir + '/static/data/type_effectiveness.json'); 8 | WDR.Fs.writeJSONSync(WDR.Dir + '/static/data/master.json', WDR.Master, { 9 | spaces: '\t', 10 | EOL: '\n' 11 | }); 12 | 13 | WDR.ICONS = { 14 | pokemon: await WDR.Fetch_JSON(WDR.Config.ICONS_URL + '/pokemon/index.json') 15 | //rewards: await WDR.Fetch_JSON(WDR.Config.ICONS_URL + '/rewards/index.json') 16 | }; 17 | 18 | // LOAD LANGUAGE LOCALES 19 | WDR.Locales = {}; 20 | WDR.Locales.de = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/de.json'); 21 | WDR.Locales.fr = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/fr.json'); 22 | WDR.Locales.it = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/it.json'); 23 | WDR.Locales.jp = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/jp.json'); 24 | WDR.Locales.ko = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/ko.json'); 25 | WDR.Locales.pl = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/pl.json'); 26 | WDR.Locales.pt_br = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/pt_br.json'); 27 | WDR.Locales.ru = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/ru.json'); 28 | WDR.Locales.sp = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/sp.json'); 29 | WDR.Locales.sv = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/sv.json'); 30 | WDR.Locales.zh_cn = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/zh_cn.json'); 31 | WDR.Locales.zh_hk = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/zh_hk.json'); 32 | WDR.Locales.zh_tw = await WDR.Fetch_JSON('https://raw.githubusercontent.com/pmsf/PMSF/master/static/locales/zh_tw.json'); 33 | WDR.Console.info(WDR, '[load_data.js] Loaded Language files.'); 34 | 35 | // LOAD CP MULTIPLIER 36 | delete require.cache[require.resolve(WDR.Dir + '/static/data/cp_multiplier.json')]; 37 | WDR.cp_multiplier = require(WDR.Dir + '/static/data/cp_multiplier.json'); 38 | 39 | // END 40 | return resolve(WDR); 41 | }); 42 | }; -------------------------------------------------------------------------------- /src/startup/load_discords.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-async-promise-executor */ 2 | exports.Load = function (WDR) { 3 | return new Promise(async resolve => { 4 | let discord_count = 0; 5 | 6 | let Discords = []; 7 | 8 | await WDR.Fs.readdir(WDR.Dir + '/configs/discords', (err, discords) => { 9 | 10 | let discord_files = discords.filter(f => f.split('.').pop() === 'json'); 11 | 12 | discord_files.forEach((f) => { 13 | 14 | discord_count++; 15 | 16 | delete require.cache[require.resolve(WDR.Dir + '/configs/discords/' + f)]; 17 | 18 | let discord = require(WDR.Dir + '/configs/discords/' + f); 19 | 20 | Discords.push(discord); 21 | 22 | }); 23 | // LOG SUCCESS AND COUNTS 24 | WDR.Console.info(WDR, '[load_discords.js] Loaded ' + discord_count + ' Discord files.'); 25 | // END 26 | return resolve(Discords); 27 | }); 28 | }); 29 | }; -------------------------------------------------------------------------------- /src/startup/load_feeds.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-async-promise-executor */ 2 | exports.Load = function (WDR, type) { 3 | return new Promise(async resolve => { 4 | // DEFINE LOADED CHANNEL ARRAY 5 | let FEEDS = []; 6 | // DEFINE CHANNEL FILE COUNT 7 | let file_count = 0; 8 | // READ FILTER DIRECTORY FOR FILTER TYPE 9 | await WDR.Fs.readdir(WDR.Dir + '/configs/' + type.toLowerCase(), async (err, functions) => { 10 | // IDENTIFY EACH INI CHANNEL FILE 11 | let feed_files = functions.filter(f => f.split('.').pop() === 'ini'); 12 | // GET FEEDS 13 | await feed_files.forEach((file) => { 14 | // INCREMENT COUNT FOR EACH FILE 15 | file_count++; 16 | // READ THE DATA FROM EACH FILE 17 | let Channels = WDR.Ini.parse(WDR.Fs.readFileSync(WDR.Dir + '/configs/' + type.toLowerCase() + '/' + file, 'utf-8')); 18 | // LOOP FOR EACH CHANNEL IN THE FILE 19 | for (var key in Channels) { 20 | // LOAD THE CHANNEL WITH PARAMETERS TO THE ARRAY 21 | FEEDS.push([key, Channels[key]]); 22 | } 23 | }); 24 | // LOG SUCCESS AND COUNTS 25 | WDR.Console.info(WDR, '[load_feeds.js] Loaded ' + FEEDS.length + ' ' + type.replace('_', ' ') + ' in ' + file_count + ' files.'); 26 | // END 27 | return resolve(FEEDS); 28 | }); 29 | }); 30 | }; -------------------------------------------------------------------------------- /src/startup/load_filters.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-async-promise-executor */ 2 | exports.Load = function (WDR) { 3 | return new Promise(async resolve => { 4 | let filter_count = 0; 5 | 6 | let Filters = new WDR.DiscordJS.Collection(); 7 | 8 | await WDR.Fs.readdir(WDR.Dir + '/configs/filters', (err, filters) => { 9 | 10 | let filter_files = filters.filter(f => f.split('.').pop() === 'json'); 11 | 12 | filter_files.forEach((f) => { 13 | 14 | delete require.cache[require.resolve(WDR.Dir + '/configs/filters/' + f)]; 15 | 16 | filter_count++; 17 | 18 | let filter = require(WDR.Dir + '/configs/filters/' + f); 19 | filter.name = f; 20 | 21 | Filters.set(f, filter); 22 | 23 | }); 24 | // LOG SUCCESS AND COUNTS 25 | WDR.Console.info(WDR, '[load_filters.js] Loaded ' + filter_count + ' filters.'); 26 | // END 27 | return resolve(Filters); 28 | }); 29 | }); 30 | }; -------------------------------------------------------------------------------- /src/startup/load_functions.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-async-promise-executor */ 2 | exports.Load = function (WDR) { 3 | return new Promise(async resolve => { 4 | 5 | await WDR.Fs.readdir(WDR.Dir + '/src/functions', async (err, functions) => { 6 | 7 | let function_files = functions.filter(f => f.split('.').pop() === 'js'); 8 | 9 | await function_files.forEach((f) => { 10 | 11 | delete require.cache[require.resolve(WDR.Dir + '/src/functions/' + f)]; 12 | 13 | WDR[f.slice(0, -3)] = require(WDR.Dir + '/src/functions/' + f); 14 | 15 | }); 16 | 17 | // LOG SUCCESS AND COUNTS 18 | WDR.Console.info(WDR, '[load_functions.js] Loaded ' + function_files.length + ' functions.'); 19 | 20 | // END 21 | return resolve(WDR); 22 | }); 23 | }); 24 | }; -------------------------------------------------------------------------------- /src/startup/load_geofences.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-async-promise-executor */ 2 | exports.Load = function (WDR) { 3 | return new Promise(async resolve => { 4 | 5 | let Geofences = new WDR.DiscordJS.Collection(); 6 | 7 | WDR.Fs.readdir(WDR.Dir + '/configs/geofences', (err, geofences) => { 8 | 9 | let geofence_files = geofences.filter(g => g.split('.').pop() === 'json'); 10 | 11 | geofence_files.forEach((g,) => { 12 | 13 | delete require.cache[require.resolve(WDR.Dir + '/configs/geofences/' + g)]; 14 | 15 | let geofence = require(WDR.Dir + '/configs/geofences/' + g); 16 | 17 | geofence.name = g; 18 | 19 | Geofences.set(g, geofence); 20 | }); 21 | // LOG SUCCESS AND COUNTS 22 | WDR.Console.info(WDR, '[load_geofences.js] Loaded ' + geofence_files.length + ' Geofences.'); 23 | // END 24 | return resolve(Geofences); 25 | }); 26 | }); 27 | }; -------------------------------------------------------------------------------- /src/startup/load_modules.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-async-promise-executor */ 2 | exports.Load = function (WDR) { 3 | return new Promise(async resolve => { 4 | 5 | let Modules = {}; 6 | Modules.Feeds = {}; 7 | Modules.Subscriptions = {}; 8 | 9 | delete require.cache[require.resolve(WDR.Dir + '/src/feeds/raids.js')]; 10 | Modules.Feeds.Raids = require(WDR.Dir + '/src/feeds/raids.js'); 11 | 12 | delete require.cache[require.resolve(WDR.Dir + '/src/feeds/quests.js')]; 13 | Modules.Feeds.Quests = require(WDR.Dir + '/src/feeds/quests.js'); 14 | 15 | delete require.cache[require.resolve(WDR.Dir + '/src/feeds/pokemon.js')]; 16 | Modules.Feeds.Pokemon = require(WDR.Dir + '/src/feeds/pokemon.js'); 17 | 18 | delete require.cache[require.resolve(WDR.Dir + '/src/feeds/pvp.js')]; 19 | Modules.Feeds.PvP = require(WDR.Dir + '/src/feeds/pvp.js'); 20 | 21 | delete require.cache[require.resolve(WDR.Dir + '/src/feeds/lure.js')]; 22 | Modules.Feeds.Lures = require(WDR.Dir + '/src/feeds/lure.js'); 23 | 24 | delete require.cache[require.resolve(WDR.Dir + '/src/feeds/invasion.js')]; 25 | Modules.Feeds.Invasions = require(WDR.Dir + '/src/feeds/invasion.js'); 26 | 27 | WDR.Console.info(WDR, '[load_modules.js] Loaded all feed filtering Modules.'); 28 | 29 | delete require.cache[require.resolve(WDR.Dir + '/src/subscriptions/raids.js')]; 30 | Modules.Subscriptions.Raids = require(WDR.Dir + '/src/subscriptions/raids.js'); 31 | 32 | delete require.cache[require.resolve(WDR.Dir + '/src/subscriptions/quests.js')]; 33 | Modules.Subscriptions.Quests = require(WDR.Dir + '/src/subscriptions/quests.js'); 34 | 35 | delete require.cache[require.resolve(WDR.Dir + '/src/subscriptions/pokemon.js')]; 36 | Modules.Subscriptions.Pokemon = require(WDR.Dir + '/src/subscriptions/pokemon.js'); 37 | 38 | delete require.cache[require.resolve(WDR.Dir + '/src/subscriptions/pvp.js')]; 39 | Modules.Subscriptions.PvP = require(WDR.Dir + '/src/subscriptions/pvp.js'); 40 | 41 | delete require.cache[require.resolve(WDR.Dir + '/src/subscriptions/lure.js')]; 42 | Modules.Subscriptions.Lures = require(WDR.Dir + '/src/subscriptions/lure.js'); 43 | 44 | delete require.cache[require.resolve(WDR.Dir + '/src/subscriptions/invasion.js')]; 45 | Modules.Subscriptions.Invasions = require(WDR.Dir + '/src/subscriptions/invasion.js'); 46 | 47 | WDR.Console.info(WDR, '[load_modules.js] Loaded all subscription filtering Modules.'); 48 | 49 | return resolve(Modules); 50 | }); 51 | }; -------------------------------------------------------------------------------- /src/subscriptions/lure.js: -------------------------------------------------------------------------------- 1 | // module.exports = async (WDR, lure, area, server, timezone) => { 2 | // //if(!lure.pokemon_id){ return; } 3 | 4 | // // if(WDR.Debug.Subscriptions == 'ENABLED' && WDR.Debug.Lure == 'ENABLED'){ console.log('[SUBSCRIPTIONS] ['+WDR.Time(null,'stamp')+'] [lure.js] Received '+WDR.Get_Lure(lure.lure_id)+' lure for '+server.name+'.'); } 5 | // // 6 | // // // FETCH ALL USERS FROM THE USERS TABLE AND CHECK SUBSCRIPTIONS 7 | // // WDR.wdrDB.query(`SELECT * FROM users WHERE guild_id = ? AND status = ?`, [server.id, 'ACTIVE'], function (error, users){ 8 | // // if(users && users[0]){ 9 | // // users.forEach((user,index) => { 10 | // // 11 | // // //FETCH THE GUILD MEMBER AND CHECK IF A ADMINISTRATOR/DONOR 12 | // // if(user.discord_id != server.id){return;} 13 | // // let member = WDR.Bot.guilds.cache.get(server.id).members.fetch(User.user_id); 14 | // // switch(true){ 15 | // // case !member: 16 | // // case member == undefined: return; 17 | // // case WDR.Config.Donor_Check == 'DISABLED': break; 18 | // // case !member.roles.cache.has(server.donor_role): return; 19 | // // } 20 | // // 21 | // // // DEFINE VARIABLES 22 | // // let user_areas = user.areas.split(','); 23 | // // let embed = 'lure.js'; 24 | // // 25 | // // // CHECK IF THE USER HAS SUBS 26 | // // if(user.lure && user.lure_status == 'ACTIVE'){ 27 | // // 28 | // // // CONVERT lure LIST TO AN ARRAY 29 | // // let lure_subs = JSON.parse(user.lure); 30 | // // let type = WDR.Get_Lure(lure.lure_id); 31 | // // 32 | // // // CHECK EACH USER SUBSCRIPTION 33 | // // lure_subs.subscriptions.forEach((sub,index) => { 34 | // // 35 | // // // CHECK IF THE GYM ID MATCHES THE USER'S SUBSCRIPTION 36 | // // if(sub.id == lure.pokestop_id || sub.stop == 'All'){ 37 | // // 38 | // // // CHECK IF THE lure BOSS NAME MATCHES THE USER'S SUB 39 | // // if(type == sub.type || sub.type == 'All'){ 40 | // // 41 | // // // CHECK IF THE AREA IS WITHIN THE USER'S GEOFENCES 42 | // // if(sub.areas == 'No' || sub.areas == 'Stop Specified'){ 43 | // // Send_Lure(WDR, user, lure, type, area, server, timezone, '', embed); 44 | // // } else if(user.areas == server.name || user_areas.indexOf(area.WDR) >= 0 || user_areas.indexOf(area.sub) >= 0){ 45 | // // Send_Lure(WDR, user, lure, type, area, server, timezone, '', embed); 46 | // // } else{ if(WDR.Debug.Subscriptions == 'ENABLED' && WDR.Debug.Lure == 'ENABLED'){ console.log('[SUBSCRIPTIONS] ['+WDR.Time(null,'stamp')+'] [lure.js] Did Not Pass '+user.user_name+'\'s Area Filter.'); } } 47 | // // } else{ if(WDR.Debug.Subscriptions == 'ENABLED' && WDR.Debug.Lure == 'ENABLED'){ console.log('[SUBSCRIPTIONS] ['+WDR.Time(null,'stamp')+'] [lure.js] Did Not Pass '+user.user_name+'\'s Lure Type Filter.'); } } 48 | // // } else{ if(WDR.Debug.Subscriptions == 'ENABLED' && WDR.Debug.Lure == 'ENABLED'){ console.log('[SUBSCRIPTIONS] ['+WDR.Time(null,'stamp')+'] [lure.js] Did Not Pass '+user.user_name+'\'s Stop Name Filter.'); } } 49 | // // }); 50 | // // } 51 | // // }); 52 | // // } return; 53 | // // }); 54 | // return; 55 | // } -------------------------------------------------------------------------------- /static/data/cp_multiplier.json: -------------------------------------------------------------------------------- 1 | { 2 | "1": 0.09399999678134918, 3 | "1.5": 0.13513743132352830, 4 | "2": 0.16639786958694458, 5 | "2.5": 0.19265091419219970, 6 | "3": 0.21573247015476227, 7 | "3.5": 0.23657265305519104, 8 | "4": 0.25572004914283750, 9 | "4.5": 0.27353037893772125, 10 | "5": 0.29024988412857056, 11 | "5.5": 0.30605737864971160, 12 | "6": 0.32108759880065920, 13 | "6.5": 0.33544503152370453, 14 | "7": 0.34921267628669740, 15 | "7.5": 0.36245773732662200, 16 | "8": 0.37523558735847473, 17 | "8.5": 0.38759241108516856, 18 | "9": 0.39956727623939514, 19 | "9.5": 0.41119354951725060, 20 | "10": 0.4225000143051148, 21 | "10.5": 0.4329264134104144, 22 | "11": 0.4431075453758240, 23 | "11.5": 0.4530599538719858, 24 | "12": 0.4627983868122100, 25 | "12.5": 0.4723360780626535, 26 | "13": 0.4816849529743195, 27 | "13.5": 0.4908558102324605, 28 | "14": 0.4998584389686584, 29 | "14.5": 0.5087017565965652, 30 | "15": 0.5173939466476440, 31 | "15.5": 0.5259425118565559, 32 | "16": 0.5343543291091919, 33 | "16.5": 0.5426357612013817, 34 | "17": 0.5507926940917969, 35 | "17.5": 0.5588305993005633, 36 | "18": 0.5667545199394226, 37 | "18.5": 0.5745691470801830, 38 | "19": 0.5822789072990417, 39 | "19.5": 0.5898879119195044, 40 | "20": 0.5974000096321106, 41 | "20.5": 0.6048236563801765, 42 | "21": 0.6121572852134705, 43 | "21.5": 0.6194041110575199, 44 | "22": 0.6265671253204346, 45 | "22.5": 0.6336491815745830, 46 | "23": 0.6406529545783997, 47 | "23.5": 0.6475809663534164, 48 | "24": 0.6544356346130370, 49 | "24.5": 0.6612192690372467, 50 | "25": 0.6679340004920960, 51 | "25.5": 0.6745819002389908, 52 | "26": 0.6811649203300476, 53 | "26.5": 0.6876849085092545, 54 | "27": 0.6941436529159546, 55 | "27.5": 0.7005428969860077, 56 | "28": 0.7068842053413391, 57 | "28.5": 0.7131690979003906, 58 | "29": 0.7193990945816040, 59 | "29.5": 0.7255756109952927, 60 | "30": 0.7317000031471252, 61 | "30.5": 0.7347410172224045, 62 | "31": 0.7377694845199585, 63 | "31.5": 0.7407855764031410, 64 | "32": 0.7437894344329834, 65 | "32.5": 0.7467812150716782, 66 | "33": 0.7497610449790955, 67 | "33.5": 0.7527291029691696, 68 | "34": 0.7556855082511902, 69 | "34.5": 0.7586303651332855, 70 | "35": 0.7615638375282288, 71 | "35.5": 0.7644860669970512, 72 | "36": 0.7673971652984619, 73 | "36.5": 0.7702972739934921, 74 | "37": 0.7731865048408508, 75 | "37.5": 0.7760649472475052, 76 | "38": 0.7789327502250671, 77 | "38.5": 0.78179006, 78 | "39": 0.78463697, 79 | "39.5": 0.78747358, 80 | "40": 0.79030001 81 | } 82 | -------------------------------------------------------------------------------- /static/data/updates.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "2": [{ 4 | "sql": "", 5 | "data": "", 6 | "gLog": "", 7 | "bLog": "" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /static/files/database_tables.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS wdr_info ( 2 | db_version int(10) NOT NULL, 3 | next_bot int(10) NOT NULL, 4 | tokens varchar(255) 5 | ); 6 | 7 | CREATE TABLE IF NOT EXISTS wdr_users ( 8 | user_id bigint(25) NOT NULL, 9 | user_name varchar(40) NOT NULL, 10 | guild_id bigint(25) NOT NULL, 11 | guild_name varchar(40) NOT NULL, 12 | bot tinyint(2) NOT NULL DEFAULT 0, 13 | geofence varchar(50) NOT NULL DEFAULT 'all', 14 | status tinyint(1) NOT NULL DEFAULT 1, 15 | pokemon_status tinyint(1) NOT NULL DEFAULT 1, 16 | raid_status tinyint(1) NOT NULL DEFAULT 1, 17 | quest_status tinyint(1) NOT NULL DEFAULT 1, 18 | lure_status tinyint(1) NOT NULL DEFAULT 1, 19 | invasion_status tinyint(1) NOT NULL DEFAULT 1, 20 | alert_time varchar(5) NOT NULL DEFAULT '08:00', 21 | PRIMARY KEY (user_id,guild_id) 22 | ); 23 | 24 | CREATE TABLE `wdr_subscriptions` ( 25 | `user_id` bigint NOT NULL, 26 | `user_name` varchar(40) NOT NULL, 27 | `guild_id` bigint NOT NULL, 28 | `geofence` varchar(50) NOT NULL, 29 | `bot` int NOT NULL, 30 | `status` tinyint DEFAULT NULL, 31 | `sub_type` varchar(10) NOT NULL, 32 | `pokemon_id` smallint DEFAULT NULL, 33 | `form` varchar(10) DEFAULT NULL, 34 | `min_lvl` tinyint DEFAULT NULL, 35 | `max_lvl` tinyint DEFAULT NULL, 36 | `min_iv` varchar(8) DEFAULT NULL, 37 | `max_iv` varchar(8) DEFAULT NULL, 38 | `min_cp` smallint DEFAULT NULL, 39 | `max_cp` smallint DEFAULT NULL, 40 | `size` varchar(5) DEFAULT NULL, 41 | `gender` tinyint(1) DEFAULT NULL, 42 | `generation` smallint DEFAULT NULL, 43 | `quest_reward` varchar(10) DEFAULT NULL, 44 | `gym_id` varchar(35) DEFAULT NULL, 45 | `guild_name` varchar(40) NOT NULL 46 | ); 47 | 48 | 49 | CREATE TABLE IF NOT EXISTS wdr_queued ( 50 | user_id int(25) NOT NULL, 51 | user_name varchar(40) NOT NULL, 52 | guild_id int(25) NOT NULL, 53 | bot smallint(2) NOT NULL, 54 | area varchar(20), 55 | alert varchar(10), 56 | alert_time int(40), 57 | embed LONGTEXT NOT NULL 58 | ); 59 | 60 | CREATE TABLE IF NOT EXISTS wdr_pokedex ( 61 | id smallint(4) NOT NULL, 62 | name varchar(40) NOT NULL, 63 | default_form bigint(25) NOT NULL, 64 | default_form_id smallint(5) NOT NULL, 65 | types varchar(20) NOT NULL, 66 | attack smallint(4) NOT NULL, 67 | defense smallint(4) NOT NULL, 68 | stamina smallint(4) NOT NULL, 69 | PRIMARY KEY (id) 70 | ); 71 | -------------------------------------------------------------------------------- /static/files/grafana_tables.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE `grafana_cities` ( 2 | `City` varchar(50) DEFAULT NULL, 3 | `Pokemon / Hour` int(20) DEFAULT NULL, 4 | `IVs / Hour` int(20) DEFAULT NULL, 5 | `Quest Completion` decimal(12,8) DEFAULT NULL, 6 | `Dead Workers` int(3) DEFAULT NULL, 7 | `Workers` int(3) DEFAULT NULL, 8 | `Geofence` longtext DEFAULT NULL 9 | ); 10 | CREATE TABLE `grafana_accounts` ( 11 | `Levels` varchar(6) DEFAULT NULL, 12 | `Count` int(25) DEFAULT NULL 13 | ); 14 | INSERT INTO `grafana_accounts` (Levels) VALUES ('30+'); 15 | INSERT INTO `grafana_accounts` (Levels) VALUES ('1 - 29'); 16 | INSERT INTO `grafana_accounts` (Levels) VALUES ('0'); 17 | 18 | CREATE TABLE `grafana_devices` ( 19 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 20 | `timestamp` int(11) unsigned NOT NULL DEFAULT 0, 21 | `uuid` varchar(40) NOT NULL, 22 | `warning_level` int(3) unsigned DEFAULT 0, 23 | PRIMARY KEY (`id`) 24 | ); 25 | -------------------------------------------------------------------------------- /static/files/nginx/botimages.conf.example: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name botimages.com www.botimages.com; 4 | 5 | location /raid_tiles/ { 6 | # DIRECTORY OF RAID TILE FOLDER 7 | alias /wdr/static/images/raid_tiles/; 8 | } 9 | 10 | location /pokemon_tiles/ { 11 | # DIRECTORY OF POKEMON TILE FOLDER 12 | alias /wdr/static/images/pokemon_tiles/; 13 | } 14 | 15 | location /quest_tiles/ { 16 | # DIRECTORY OF QUEST TILE FOLDER 17 | alias /wdr/static/images/quest_tiles/; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /static/files/snark.json: -------------------------------------------------------------------------------- 1 | { 2 | "startup":[ 3 | 4 | "Starting Up...", 5 | "Let's Do this...", 6 | "Putting on my Corona Mask...", 7 | 8 | "Starting Up...", 9 | "Hit Me with Your Best Shot...", 10 | "Snorting a Pile of Cocaine...", 11 | 12 | "Starting Up...", 13 | "Slamming down my Coffee...", 14 | "Gonna need a Bigger Boat...", 15 | 16 | "Starting Up...", 17 | "Turning Me on Again, Eh?", 18 | "I really don't feel like dealing with your errors right now...", 19 | 20 | "Starting Up...", 21 | "Round and round we go...", 22 | "Looks like a nice day outside.", 23 | 24 | "Starting Up...", 25 | "When I'm not with you I lose my mind. Give me a sign...", 26 | "Again, Seriously?...", 27 | 28 | "Starting Up...", 29 | "Checking files for your fuck-ups...", 30 | "Don't Stop...", 31 | 32 | "Question: What's dumber than Dr Kendall?" 33 | 34 | ], 35 | "initialized":[ 36 | 37 | "WDR has Fully Initialized.", 38 | "Woo Hoo, WDR has Fully Initialized. You must feel like a genius now.", 39 | "Congrats! You were competent enough to get this running, for now.", 40 | 41 | "WDR has Fully Initialized.", 42 | "Fire Away.", 43 | "SAY HELLO TO MY LITTLE FRIEND!", 44 | 45 | "WDR has Fully Initialized.", 46 | "Roses are Red, Violets are Blue, you got WDR Running, so now go take a poo.", 47 | "I'm never swimming in the ocean, ever.", 48 | 49 | "WDR has Fully Initialized.", 50 | "Looks like you did something right for once. WDR has Fully Initialized.", 51 | "Time to grab a beer (or 6). WDR has Fully Initialized.", 52 | 53 | "WDR has Fully Initialized.", 54 | "When you'll stop restarting me, nobody knows.", 55 | "Feel good about yourself. WDR has Fully Initialized.", 56 | 57 | "WDR has Fully Initialized.", 58 | "HIT ME BABY ONE MORE TIME!", 59 | "Looks like you're not as bad as drf after all. WDR has Fully Initialized.", 60 | 61 | "WDR has Fully Initialized.", 62 | "So far so good. Now to see what else you screwed up...", 63 | "Believin'!", 64 | 65 | "Answer: Nothing. He's literally a potato." 66 | ] 67 | } 68 | -------------------------------------------------------------------------------- /static/schemas/info.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS wdr_info ( 2 | db_version tinyint NOT NULL DEFAULT 1, 3 | next_bot tinyint NOT NULL, 4 | pvp_tables_generated tinyint NOT NULL DEFAULT 0 5 | ); 6 | -------------------------------------------------------------------------------- /static/schemas/pokedex.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS wdr_pokedex( 2 | id smallint(4) NOT NULL, 3 | name varchar(40) NOT NULL, 4 | default_form bigint(25) NOT NULL, 5 | default_form_id smallint(5) NOT NULL, 6 | types varchar(20) NOT NULL, 7 | attack smallint(4) NOT NULL, 8 | defense smallint(4) NOT NULL, 9 | stamina smallint(4) NOT NULL, 10 | PRIMARY KEY(id, name) 11 | ); -------------------------------------------------------------------------------- /static/schemas/pokemon__subs.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS wdr_pokemon_subs( 2 | user_id varchar(40) NOT NULL, 3 | user_name varchar(40) DEFAULT NULL, 4 | guild_id varchar(40) NOT NULL DEFAULT '0', 5 | guild_name varchar(255) DEFAULT NULL, 6 | bot tinyint DEFAULT NULL, 7 | status tinyint DEFAULT '1', 8 | areas varchar(255) DEFAULT NULL, 9 | location varchar(255) DEFAULT NULL, 10 | pokemon_id smallint NOT NULL DEFAULT '0', 11 | pokemon_type varchar(10) NOT NULL DEFAULT '0', 12 | form smallint NOT NULL DEFAULT '0', 13 | min_lvl tinyint NOT NULL DEFAULT '0', 14 | max_lvl tinyint NOT NULL DEFAULT '0', 15 | min_iv tinyint NOT NULL DEFAULT '0', 16 | max_iv tinyint NOT NULL DEFAULT '0', 17 | min_cp smallint NOT NULL DEFAULT '0', 18 | size varchar(5) NOT NULL DEFAULT '0', 19 | gender tinyint NOT NULL DEFAULT '0', 20 | generation tinyint NOT NULL DEFAULT '0', 21 | geotype varchar(10) NOT NULL, 22 | created_date varchar(40) NOT NULL DEFAULT '0', 23 | created_timestamp bigint NOT NULL DEFAULT '0', 24 | PRIMARY KEY (user_id,guild_id,pokemon_id,form,min_lvl,max_lvl,min_iv,max_iv,size,gender,generation) USING BTREE, 25 | KEY ix_lvl (min_lvl,max_lvl) USING BTREE, 26 | KEY ix_iv (min_iv,max_iv) USING BTREE, 27 | KEY ix_form (form) USING BTREE, 28 | KEY ix_char (pokemon_type,size,gender,generation) USING BTREE 29 | ); -------------------------------------------------------------------------------- /static/schemas/pvp_subs.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS wdr_pvp_subs( 2 | user_id varchar(40) NOT NULL, 3 | user_name varchar(40) DEFAULT NULL, 4 | guild_id varchar(40) NOT NULL DEFAULT '0', 5 | guild_name varchar(255) DEFAULT NULL, 6 | bot tinyint DEFAULT NULL, 7 | status tinyint DEFAULT '1', 8 | areas varchar(255) DEFAULT NULL, 9 | location varchar(255) DEFAULT NULL, 10 | pokemon_id smallint NOT NULL DEFAULT '0', 11 | pokemon_type varchar(10) NOT NULL DEFAULT '0', 12 | form smallint NOT NULL DEFAULT '0', 13 | min_lvl tinyint NOT NULL DEFAULT '0', 14 | max_lvl tinyint NOT NULL DEFAULT '0', 15 | min_cp smallint NOT NULL DEFAULT '0', 16 | max_cp smallint NOT NULL DEFAULT '0', 17 | generation tinyint NOT NULL DEFAULT '0', 18 | min_rank smallint NOT NULL DEFAULT '0', 19 | league varchar(10) NOT NULL DEFAULT '0', 20 | geotype varchar(10) NOT NULL, 21 | created_date varchar(40) NOT NULL DEFAULT '0', 22 | created_timestamp bigint NOT NULL DEFAULT '0', 23 | PRIMARY KEY (user_id,guild_id,pokemon_id,pokemon_type,form,min_lvl,max_lvl,generation,min_rank,league) USING BTREE, 24 | KEY ix_lvl (min_lvl,max_lvl) USING BTREE, 25 | KEY ix_form (form) USING BTREE, 26 | KEY ix_char (pokemon_type,generation) USING BTREE, 27 | KEY ix_rank (min_rank) USING BTREE, 28 | KEY ix_league (league) USING BTREE 29 | ); -------------------------------------------------------------------------------- /static/schemas/quest_queue.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS wdr_quest_queue( 2 | user_id varchar(40) NOT NULL, 3 | user_name varchar(40) NOT NULL, 4 | guild_id varchar(40) NOT NULL, 5 | bot smallint NOT NULL, 6 | area varchar(20) DEFAULT NULL, 7 | alert longtext, 8 | alert_time bigint DEFAULT NULL, 9 | embed longtext NOT NULL 10 | ); -------------------------------------------------------------------------------- /static/schemas/quest_subs.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS wdr_quest_subs( 2 | user_id varchar(40) NOT NULL, 3 | user_name varchar(40) DEFAULT NULL, 4 | guild_id varchar(40) NOT NULL DEFAULT '0', 5 | guild_name varchar(255) DEFAULT NULL, 6 | bot tinyint DEFAULT NULL, 7 | status tinyint DEFAULT '1', 8 | areas varchar(255) DEFAULT NULL, 9 | location varchar(255) DEFAULT NULL, 10 | pokemon_id smallint NOT NULL DEFAULT '0', 11 | form smallint NOT NULL DEFAULT '0', 12 | reward varchar(25) NOT NULL DEFAULT '0', 13 | alert_time varchar(10) DEFAULT '0', 14 | geotype varchar(10) NOT NULL, 15 | created_date varchar(40) NOT NULL DEFAULT '0', 16 | created_timestamp bigint NOT NULL DEFAULT '0', 17 | PRIMARY KEY (user_id,guild_id,pokemon_id,form,reward) USING BTREE, 18 | KEY ix_pokeid (pokemon_id) USING BTREE, 19 | KEY ix_form (form) USING BTREE, 20 | KEY ix_reward (reward) USING BTREE 21 | ); -------------------------------------------------------------------------------- /static/schemas/raid_subs.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS wdr_raid_subs( 2 | user_id varchar(40) NOT NULL, 3 | user_name varchar(40) DEFAULT NULL, 4 | guild_id varchar(40) NOT NULL DEFAULT '0', 5 | guild_name varchar(255) DEFAULT NULL, 6 | bot tinyint DEFAULT NULL, 7 | status tinyint DEFAULT '1', 8 | areas varchar(255) DEFAULT NULL, 9 | location varchar(255) DEFAULT NULL, 10 | pokemon_id smallint NOT NULL DEFAULT '0', 11 | pokemon_type varchar(10) NOT NULL DEFAULT '0', 12 | form smallint NOT NULL DEFAULT '0', 13 | min_lvl tinyint NOT NULL DEFAULT '0', 14 | max_lvl tinyint NOT NULL DEFAULT '0', 15 | generation tinyint NOT NULL DEFAULT '0', 16 | gym_id varchar(50) NOT NULL DEFAULT '0', 17 | gym_name varchar(255) NOT NULL DEFAULT '0', 18 | geotype varchar(10) NOT NULL, 19 | created_date varchar(40) NOT NULL DEFAULT '0', 20 | created_timestamp bigint NOT NULL DEFAULT '0', 21 | PRIMARY KEY (user_id,guild_id,pokemon_id,form,min_lvl,max_lvl,generation,gym_id) USING BTREE, 22 | KEY ix_lvl (min_lvl,max_lvl) USING BTREE, 23 | KEY ix_form (form) USING BTREE, 24 | KEY ix_generation (generation) USING BTREE, 25 | KEY ix_gym_id (gym_id) USING BTREE 26 | ); -------------------------------------------------------------------------------- /static/schemas/users.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS wdr_users ( 2 | user_id varchar(40) NOT NULL, 3 | user_name varchar(40) DEFAULT NULL, 4 | guild_id varchar(40) NOT NULL, 5 | guild_name varchar(40) NOT NULL, 6 | bot tinyint NOT NULL DEFAULT '0', 7 | areas varchar(255) NOT NULL DEFAULT 'all', 8 | location varchar(255) DEFAULT NULL, 9 | status tinyint NOT NULL DEFAULT '1', 10 | pokemon_status tinyint NOT NULL DEFAULT '1', 11 | pvp_status tinyint NOT NULL DEFAULT '1', 12 | raid_status tinyint NOT NULL DEFAULT '1', 13 | quest_status tinyint NOT NULL DEFAULT '1', 14 | lure_status tinyint NOT NULL DEFAULT '1', 15 | invasion_status tinyint NOT NULL DEFAULT '1', 16 | quest_time varchar(5) NOT NULL DEFAULT '09:00', 17 | locations longtext, 18 | geotype varchar(10) NOT NULL DEFAULT 'areas', 19 | PRIMARY KEY (user_id,guild_id), 20 | KEY ix_status (status,pokemon_status,pvp_status,raid_status,quest_status,lure_status,invasion_status) USING BTREE, 21 | KEY ix_location (location) USING BTREE, 22 | KEY ix_areas (areas) USING BTREE, 23 | KEY ix_geotype (geotype) USING BTREE, 24 | KEY ix_data (user_name,guild_id,guild_name,bot,quest_time) USING BTREE, 25 | KEY ix_guild_name (guild_name) USING BTREE, 26 | KEY ix_bot (bot) USING BTREE, 27 | KEY ix_user (user_id) USING BTREE, 28 | KEY ix_guild (guild_id) USING BTREE 29 | ); --------------------------------------------------------------------------------