allow admin to increase dalle budget with commands
This commit is contained in:
parent
6e74ac1fd5
commit
3786a1434a
1 changed files with 15 additions and 0 deletions
|
|
@ -123,6 +123,21 @@ class ChatGPT(commands.Cog):
|
||||||
category_scores = response_data['results'][0]['category_scores']
|
category_scores = response_data['results'][0]['category_scores']
|
||||||
return (flagged, categories, category_scores)
|
return (flagged, categories, category_scores)
|
||||||
|
|
||||||
|
@commands.command()
|
||||||
|
async def budget(self, ctx, command: str, budget: int):
|
||||||
|
if ctx.author.id == self.admin_id:
|
||||||
|
if command == "add":
|
||||||
|
self.dalle_budget += budget
|
||||||
|
await ctx.send(f"Budget increased by {budget}")
|
||||||
|
elif command == "remove":
|
||||||
|
self.dalle_budget -= budget
|
||||||
|
await ctx.send(f"Budget decreased by {budget}")
|
||||||
|
elif command == "set":
|
||||||
|
self.dalle_budget = budget
|
||||||
|
await ctx.send(f"Budget set to {budget}")
|
||||||
|
else:
|
||||||
|
await ctx.send(f"The current budget is {self.dalle_budget}")
|
||||||
|
|
||||||
|
|
||||||
@commands.command(
|
@commands.command(
|
||||||
name="costs",
|
name="costs",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue