From 0e3c1afd2fbb5e6ad55f9fe1f1f1319695ef1794 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 2 Jul 2017 19:44:20 +0000 Subject: [PATCH 1/2] Update before pull --- price.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/price.py b/price.py index 55f3c0f..6c2f50f 100644 --- a/price.py +++ b/price.py @@ -675,7 +675,7 @@ def commodity(bot, trigger): commodity_key = 'B1ZnykTmG6_A1vkwzt9u' input_com = trigger.group(2).upper() if input_com == ('AU' or 'GOLD' or 'XAU'): - commodity = 'AU_EGL' + commodity = 'AU_EIB' unit = 'oz' elif input_com == ('AG' or 'SILVER' or 'XAG'): commodity = 'AG_USD' From 0142fcb49df5f437dd7d5c15818e79e0f6f598a9 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 2 Jul 2017 19:57:12 +0000 Subject: [PATCH 2/2] Fix whale or not --- trifling.py | 97 +++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 47 deletions(-) diff --git a/trifling.py b/trifling.py index e508e1c..52f0b99 100644 --- a/trifling.py +++ b/trifling.py @@ -597,51 +597,54 @@ def whaleornot(bot, trigger): if not trigger.group(2): bot.say("Gotta have skin in the game to be a big fish! Add some XMR after the command to see what level the player is at!") - else - xmr_size = int(trigger.group(2)) - if xmr_size < 0.1: - fish_string = "plankton" - elif xmr_size >= 0.1 and xmr_size < 0.2: - fish_string = "Paedocypris" - elif xmr_size >= 0.2 and xmr_size < 0.5: - fish_string = "Dwarf Goby" - elif xmr_size >= 0.5 and xmr_size < 1: - fish_string = "European Pilchard" - elif xmr_size >= 1 and xmr_size < 2: - fish_string = "Goldfish" - elif xmr_size >= 2 and xmr_size < 5: - fish_string = "Herring" - elif xmr_size >= 5 and xmr_size < 10: - fish_string = "Atlantic Macerel" - elif xmr_size >= 10 and xmr_size < 20: - fish_string = "Gilt-head Bream" - elif xmr_size >= 20 and xmr_size < 50: - fish_string = "Salmonidae" - elif xmr_size >= 50 and xmr_size < 100: - fish_string = "Gadidae" - elif xmr_size >= 100 and xmr_size < 200: - fish_string = "Norwegian Delicious Salmon" - elif xmr_size >= 200 and xmr_size < 500: - fish_string = "Electric eel" - elif xmr_size >= 500 and xmr_size < 1000: - fish_string = "Tuna" - elif xmr_size >= 1000 and xmr_size < 2000: - fish_string = "Wels catfish" - elif xmr_size >= 2000 and xmr_size < 5000: - fish_string = "Black marlin" - elif xmr_size >= 5000 and xmr_size < 10000: - fish_string = "Shark" - elif xmr_size >= 10000 and xmr_size < 20000: - fish_string = "Dolphin" - elif xmr_size >= 20000 and xmr_size < 40000: - fish_string = "Narwhal" - elif xmr_size >= 40000 and xmr_size < 60000: - fish_string = "Orca" - elif xmr_size >= 60000 and xmr_size < 100000: - fish_string = "Blue Whale" - elif xmr_size >= 100000 and xmr_size < 200000: - fish_string = "Leviathan" - elif xmr_size >= 200000: - fish_string = "Cthulu" + else: + try: + xmr_size = int(trigger.group(2)) + if xmr_size < 0.1: + fish_string = "plankton" + elif xmr_size >= 0.1 and xmr_size < 0.2: + fish_string = "Paedocypris" + elif xmr_size >= 0.2 and xmr_size < 0.5: + fish_string = "Dwarf Goby" + elif xmr_size >= 0.5 and xmr_size < 1: + fish_string = "European Pilchard" + elif xmr_size >= 1 and xmr_size < 2: + fish_string = "Goldfish" + elif xmr_size >= 2 and xmr_size < 5: + fish_string = "Herring" + elif xmr_size >= 5 and xmr_size < 10: + fish_string = "Atlantic Macerel" + elif xmr_size >= 10 and xmr_size < 20: + fish_string = "Gilt-head Bream" + elif xmr_size >= 20 and xmr_size < 50: + fish_string = "Salmonidae" + elif xmr_size >= 50 and xmr_size < 100: + fish_string = "Gadidae" + elif xmr_size >= 100 and xmr_size < 200: + fish_string = "Norwegian Delicious Salmon" + elif xmr_size >= 200 and xmr_size < 500: + fish_string = "Electric eel" + elif xmr_size >= 500 and xmr_size < 1000: + fish_string = "Tuna" + elif xmr_size >= 1000 and xmr_size < 2000: + fish_string = "Wels catfish" + elif xmr_size >= 2000 and xmr_size < 5000: + fish_string = "Black marlin" + elif xmr_size >= 5000 and xmr_size < 10000: + fish_string = "Shark" + elif xmr_size >= 10000 and xmr_size < 20000: + fish_string = "Dolphin" + elif xmr_size >= 20000 and xmr_size < 40000: + fish_string = "Narwhal" + elif xmr_size >= 40000 and xmr_size < 60000: + fish_string = "Orca" + elif xmr_size >= 60000 and xmr_size < 100000: + fish_string = "Blue Whale" + elif xmr_size >= 100000 and xmr_size < 200000: + fish_string = "Leviathan" + elif xmr_size >= 200000: + fish_string = "Cthulu" + bot.say("{0} level.".format(fish_string)) + except: + bot.say("Try a base ten representation of a number") - bot.say("{0} level.".format(fish_string))