From 20154d8ec4dfe262406e4ececd758f6f8be845aa Mon Sep 17 00:00:00 2001 From: phixxy Date: Sat, 16 Mar 2024 00:41:05 -0700 Subject: [PATCH] made budget args optional --- cogs/chatgpt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cogs/chatgpt.py b/cogs/chatgpt.py index 80de4a9..bbddda0 100644 --- a/cogs/chatgpt.py +++ b/cogs/chatgpt.py @@ -124,16 +124,16 @@ class ChatGPT(commands.Cog): return (flagged, categories, category_scores) @commands.command() - async def budget(self, ctx, command: str, budget: float): + async def budget(self, ctx, command=None, budget=None): try: if ctx.author.id == self.admin_id: - if command == "add": + if command == "add" and budget!= None: self.dalle_budget += budget await ctx.send(f"Budget increased by {budget}") - elif command == "remove": + elif command == "remove" and budget!= None: self.dalle_budget -= budget await ctx.send(f"Budget decreased by {budget}") - elif command == "set": + elif command == "set" and budget!= None: self.dalle_budget = budget await ctx.send(f"Budget set to {budget}") else: