From 2dc687707a225e2e8c12b7301d1d55072f0f7d26 Mon Sep 17 00:00:00 2001 From: neryss Date: Sat, 26 Nov 2022 23:32:13 +0000 Subject: [PATCH] added icons for world --- commands/mh_rise.js | 1 - commands/mhw_search.js | 15 ++++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/commands/mh_rise.js b/commands/mh_rise.js index 32328e7..6dd8900 100644 --- a/commands/mh_rise.js +++ b/commands/mh_rise.js @@ -24,7 +24,6 @@ async function match_found(data, i) .setColor("#ff0080") .setTitle(data[i].name) .addField("Inflicts : ", "(ailments inflicted by the monster)"); - // TODO: add monster icon try { weakness.setThumbnail("http://neryss.pw/icons/rise-" + data[i].name.toLowerCase().replaceAll(" ", "_") + "-icon.png"); } diff --git a/commands/mhw_search.js b/commands/mhw_search.js index 001b703..b10ac75 100644 --- a/commands/mhw_search.js +++ b/commands/mhw_search.js @@ -26,15 +26,12 @@ function match_found(found, data, i) .setColor("#ff0080") .setTitle(data[i].name) .addField("Inflicts : ", "(ailments inflicted by the monster)"); - if (data[i].icon) - { - // TODO add monster icons localy - try { - weakness.setThumbnail("http://neryss.pw/icons/mhw-" + data[i].name.toLowerCase() + "_icon.png"); - } - catch (err) { - console.log("no thumbnail found for -" + data[i].name.toLowerCase() + "-!"); - } + try { + console.log(data[i].name.toLowerCase()); + weakness.setThumbnail("http://neryss.pw/icons/mhw-" + data[i].name.toLowerCase().replaceAll(" ", "_") + "-icon.png"); + } + catch (err) { + console.log("no thumbnail found for -" + data[i].name.toLowerCase() + "-!"); } e_inflicts = data[i].ailments; for (var j = 0; j < e_inflicts.length; j++)