made budget args optional
This commit is contained in:
parent
f0dccd2233
commit
20154d8ec4
1 changed files with 4 additions and 4 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue