diff --git a/cord/accounts.py b/cord/accounts.py index 9bb8d5d..8284033 100755 --- a/cord/accounts.py +++ b/cord/accounts.py @@ -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()}} }) diff --git a/cord/autochat.py b/cord/autochat.py index 85c8c94..5131adc 100755 --- a/cord/autochat.py +++ b/cord/autochat.py @@ -1,6 +1,5 @@ import embedder - from nextcord import DMChannel async def process(message): diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bd34c71 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +openai +aiohttp +nextcord +requests +python-dotenv \ No newline at end of file