diff --git a/src/commands/subscription/pokemon/create.js b/src/commands/subscription/pokemon/create.js index 52f1d5e..a0537a2 100644 --- a/src/commands/subscription/pokemon/create.js +++ b/src/commands/subscription/pokemon/create.js @@ -75,9 +75,6 @@ module.exports = (WDR, Functions, Message, Member, advanced) => { } else { create.size = 0; } - - create.areas = await Functions.DetailCollect(WDR, Functions, "Geofence", Member, Message, null, "Please respond with 'Yes' or 'No'", create); - } else { create.max_iv = 100; @@ -94,8 +91,14 @@ module.exports = (WDR, Functions, Message, Member, advanced) => { create.min_iv = await Functions.DetailCollect(WDR, Functions, "Minimum IV", Member, Message, null, min_iv_req, create); create.min_lvl = await Functions.DetailCollect(WDR, Functions, "Minimum Level", Member, Message, null, "Please respond with a value between 0 and " + WDR.Max_Pokemon_Level + " or type 'All'. Type 'Cancel' to Stop.", create); - - create.geotype = await Functions.DetailCollect(WDR, Functions, "Geofence", Member, Message, null, "Please respond with 'Yes' or 'No'", create); + } + create.geotype = await Functions.DetailCollect(WDR, Functions, "Geofence", Member, Message, null, "Please respond with 'Yes' or 'No'", create); + if (create.geotype == "location") { + create.areas = Member.db.location.name; + } else if (create.geotype == "areas") { + create.areas = Member.db.areas; + } else { + create.areas = "All"; } create.confirm = await Functions.DetailCollect(WDR, Functions, "Confirm-Add", Member, Message, null, "Type 'Yes' or 'No'. Subscription will be saved.", create); diff --git a/src/commands/subscription/pvp/create.js b/src/commands/subscription/pvp/create.js index 9520920..972e3ac 100644 --- a/src/commands/subscription/pvp/create.js +++ b/src/commands/subscription/pvp/create.js @@ -60,7 +60,15 @@ module.exports = async (WDR, Functions, Message, Member, advanced) => { // } else { // create.min_cp = 0; // } + create.geotype = await Functions.DetailCollect(WDR, Functions, "Geofence", Member, Message, null, "Please respond with 'Yes' or 'No'", create); + if (create.geotype == "location") { + create.areas = Member.db.location.name; + } else if (create.geotype == "areas") { + create.areas = Member.db.areas; + } else { + create.areas = "All"; + } create.confirm = await Functions.DetailCollect(WDR, Functions, "Confirm-Add", Member, Message, null, "Type 'Yes' or 'No'. Subscription will be saved.", create); if (create.confirm === false) { diff --git a/src/commands/subscription/raid/create.js b/src/commands/subscription/raid/create.js index 75e692b..725caeb 100644 --- a/src/commands/subscription/raid/create.js +++ b/src/commands/subscription/raid/create.js @@ -132,8 +132,14 @@ module.exports = (WDR, Functions, Message, Member, gym_name_array, gym_detail_ar if (create.gym === 0) { create.geotype = await Functions.DetailCollect(WDR, Functions, "Geofence", Member, Message, null, "Please respond with 'Yes' or 'No'", create, gym_name_array, gym_detail_array, gym_collection); + if (create.geotype == "location") { + create.areas = Member.db.location.name; + } else if (create.geotype == "areas") { + create.areas = Member.db.areas; + } } else { create.geotype = "city"; + sub.areas = "All" } create.confirm = await Functions.DetailCollect(WDR, Functions, "Confirm-Add", Member, Message, null, "Type 'Yes' or 'No'. Subscription will be saved.", create, gym_name_array, gym_detail_array, gym_collection); diff --git a/src/commands/subscription/raid/view.js b/src/commands/subscription/raid/view.js index b2e8223..4ce4391 100644 --- a/src/commands/subscription/raid/view.js +++ b/src/commands/subscription/raid/view.js @@ -23,7 +23,15 @@ module.exports = (WDR, Functions, Message, Member, gym_name_array, gym_detail_ar for (let s = 0, slen = subscriptions.length; s < slen; s++) { let choice = s + 1; let sub_data = subscriptions[s]; - sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.pokemon_id] ? WDR.Master.Pokemon[sub_data.pokemon_id].name : "All Raid Bosses"; + if (sub_data.pokemon_id < 0) { + if (sub_data.pokemon_id == -1) { + sub_data.pokemon_name = "All Raids & Eggs"; + } else if (sub_data.pokemon_id == -2) { + sub_data.pokemon_name = "All Eggs"; + } + } else { + sub_data.pokemon_name = WDR.Master.Pokemon[sub_data.pokemon_id] ? WDR.Master.Pokemon[sub_data.pokemon_id].name : "All Raid Bosses"; + } sub_list += "**" + choice + " - " + sub_data.pokemon_name + "**\n"; let data = ""; if (sub_data.gym_id !== 0) {