From af807bb8e2b2053decb0df1367f33d46b2854335 Mon Sep 17 00:00:00 2001 From: Mitchell Gleed Date: Thu, 11 Nov 2021 17:53:37 -0500 Subject: [PATCH] Suppress low runes (#14) * suppress low runes from discord log * suppress low runes from discord log --- src/pickit.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/pickit.py b/src/pickit.py index 6d12554..c30ee24 100644 --- a/src/pickit.py +++ b/src/pickit.py @@ -55,13 +55,20 @@ class PickIt: time.sleep(0.1) mouse.click(button="left") time.sleep(0.5) + + if found_items: + try: + runeLvl = int(closest_item.name.split('_')[1]) + except: + runeLvl=0 - if found_items and ("rune_" in closest_item.name or "tt_" in closest_item.name): + if found_items and ((runeLvl >= 23) or ("tt_" in closest_item.name)): + if self._config.general["send_drops_to_discord"]: send_discord_thread = threading.Thread(target=send_discord, args=(closest_item.name,)) send_discord_thread.daemon = True send_discord_thread.start() - + if self._config.general["custom_discord_hook"] != "": send_discord_thread = threading.Thread(target=send_discord, args=(closest_item.name, self._config.general["custom_discord_hook"])) send_discord_thread.daemon = True