This commit is contained in:
NovaOSS Admins 2023-10-15 22:51:38 +00:00
parent 94a68a70f9
commit bfd6608f39
3 changed files with 9 additions and 5 deletions

View file

@ -1,7 +1,7 @@
"""Account system functionality."""
import os
import json
import ujson
import requests
import string
import random
@ -45,7 +45,7 @@ This is all we have stored about your API account in our database.
Feel free to request a removal of your account by contacting the staff.
||```json
{json.dumps(account, indent=4)}
{ujson.dumps(account, indent=4)}
```||
(Click to reveal)
@ -114,7 +114,7 @@ Please report this issue to the staff!""", ephemeral=True)
'Content-Type': 'application/json',
'Authorization': os.getenv('CORE_API_KEY')
},
data=json.dumps({
data=ujson.dumps({
"discord_id": account["auth"]["discord"],
"updates": {"$set": {"credits": amount}}
})
@ -141,7 +141,7 @@ async def reset_key(interaction):
'Content-Type': 'application/json',
'Authorization': os.getenv('CORE_API_KEY')
},
data=json.dumps({
data=ujson.dumps({
"discord_id": account["auth"]["discord"],
"updates": {"$set": {"api_key": await new_api_key()}}
})

View file

@ -1,6 +1,5 @@
import embedder
from nextcord import DMChannel
async def process(message):

5
requirements.txt Normal file
View file

@ -0,0 +1,5 @@
openai
aiohttp
nextcord
requests
python-dotenv