From f3b4d674e5fe5fed5f9f699e35595662d4923095 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 24 May 2020 11:36:10 +0200 Subject: [PATCH] Make treasures case insensitive --- royalpack/commands/magicktreasure.py | 2 +- royalpack/commands/treasure.py | 2 +- royalpack/tables/fiorygitransactions.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/royalpack/commands/magicktreasure.py b/royalpack/commands/magicktreasure.py index 2b16b16f..8752d08a 100644 --- a/royalpack/commands/magicktreasure.py +++ b/royalpack/commands/magicktreasure.py @@ -36,7 +36,7 @@ class MagicktreasureCommand(rc.Command): await data.delete_invoking() author = await data.get_author(error_if_none=True) - code = args[0] + code = args[0].lower() try: value = int(args[1]) except ValueError: diff --git a/royalpack/commands/treasure.py b/royalpack/commands/treasure.py index 70d58482..bc7337d2 100644 --- a/royalpack/commands/treasure.py +++ b/royalpack/commands/treasure.py @@ -14,7 +14,7 @@ class TreasureCommand(rc.Command): async def run(self, args: rc.CommandArgs, data: rc.CommandData) -> None: author = await data.get_author(error_if_none=True) - code = args[0] + code = args[0].lower() TreasureT = self.alchemy.get(Treasure) diff --git a/royalpack/tables/fiorygitransactions.py b/royalpack/tables/fiorygitransactions.py index 42366729..406381e8 100644 --- a/royalpack/tables/fiorygitransactions.py +++ b/royalpack/tables/fiorygitransactions.py @@ -73,8 +73,7 @@ class FiorygiTransaction: if qty > 0: msg = f"💰 [b]{user_str}[/b] ha ottenuto [b]{qty}[/b] fioryg{'i' if qty != 1 else ''} per [i]{reason}[/i]!" elif qty == 0: - msg = f"❓ [b]{user_str}[/b] ha ottenuto [b]{qty}[/b] fioryg{'i' if qty != 1 else ''}...? " \ - f"Per [i]{reason}[/i]...? Cosa?" + msg = f"❓ [b]{user_str}[/b] ha mantenuto i suoi fiorygi attuali per [i]{reason}[/i].\nWait, cosa?" else: msg = f"💸 [b]{user_str}[/b] ha perso [b]{-qty}[/b] fioryg{'i' if qty != -1 else ''} per [i]{reason}[/i]."