From d0643a8b97bd419b43e86db89f23b185b180b452 Mon Sep 17 00:00:00 2001 From: ferretinjapan Date: Mon, 24 Jul 2017 15:34:38 +0000 Subject: [PATCH] .trebuchet command and whaleornot number as a float --- trifling.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/trifling.py b/trifling.py index 52f0b99..78b753e 100644 --- a/trifling.py +++ b/trifling.py @@ -599,8 +599,10 @@ def whaleornot(bot, trigger): 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: try: - xmr_size = int(trigger.group(2)) - if xmr_size < 0.1: + xmr_size = float(trigger.group(2)) + if xmr_size <= 0: + fish_string = "amoeba" + elif xmr_size < 0.1: fish_string = "plankton" elif xmr_size >= 0.1 and xmr_size < 0.2: fish_string = "Paedocypris" @@ -648,3 +650,6 @@ def whaleornot(bot, trigger): except: bot.say("Try a base ten representation of a number") +@sopel.module.commands('trebuchet') +def trebuchet(bot, trigger): + bot.say("Can YOU use a counterweight to launch a 90 kg projectile over 300 meters? Yeah, I thought not.")