mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Make treasures case insensitive
This commit is contained in:
parent
49befa61bd
commit
f3b4d674e5
3 changed files with 3 additions and 4 deletions
|
@ -36,7 +36,7 @@ class MagicktreasureCommand(rc.Command):
|
||||||
await data.delete_invoking()
|
await data.delete_invoking()
|
||||||
author = await data.get_author(error_if_none=True)
|
author = await data.get_author(error_if_none=True)
|
||||||
|
|
||||||
code = args[0]
|
code = args[0].lower()
|
||||||
try:
|
try:
|
||||||
value = int(args[1])
|
value = int(args[1])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
|
@ -14,7 +14,7 @@ class TreasureCommand(rc.Command):
|
||||||
|
|
||||||
async def run(self, args: rc.CommandArgs, data: rc.CommandData) -> None:
|
async def run(self, args: rc.CommandArgs, data: rc.CommandData) -> None:
|
||||||
author = await data.get_author(error_if_none=True)
|
author = await data.get_author(error_if_none=True)
|
||||||
code = args[0]
|
code = args[0].lower()
|
||||||
|
|
||||||
TreasureT = self.alchemy.get(Treasure)
|
TreasureT = self.alchemy.get(Treasure)
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,7 @@ class FiorygiTransaction:
|
||||||
if qty > 0:
|
if qty > 0:
|
||||||
msg = f"💰 [b]{user_str}[/b] ha ottenuto [b]{qty}[/b] fioryg{'i' if qty != 1 else ''} per [i]{reason}[/i]!"
|
msg = f"💰 [b]{user_str}[/b] ha ottenuto [b]{qty}[/b] fioryg{'i' if qty != 1 else ''} per [i]{reason}[/i]!"
|
||||||
elif qty == 0:
|
elif qty == 0:
|
||||||
msg = f"❓ [b]{user_str}[/b] ha ottenuto [b]{qty}[/b] fioryg{'i' if qty != 1 else ''}...? " \
|
msg = f"❓ [b]{user_str}[/b] ha mantenuto i suoi fiorygi attuali per [i]{reason}[/i].\nWait, cosa?"
|
||||||
f"Per [i]{reason}[/i]...? Cosa?"
|
|
||||||
else:
|
else:
|
||||||
msg = f"💸 [b]{user_str}[/b] ha perso [b]{-qty}[/b] fioryg{'i' if qty != -1 else ''} per [i]{reason}[/i]."
|
msg = f"💸 [b]{user_str}[/b] ha perso [b]{-qty}[/b] fioryg{'i' if qty != -1 else ''} per [i]{reason}[/i]."
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue