Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -128,6 +128,7 @@ async def sync(ctx: Context) -> None:
|
|
128 |
@client.event
|
129 |
async def on_ready():
|
130 |
print("Ready!")
|
|
|
131 |
|
132 |
@client.event
|
133 |
async def on_message_create(msg):
|
@@ -136,6 +137,5 @@ async def on_message_create(msg):
|
|
136 |
cookie, id = f.read().split("\n")
|
137 |
r = await chat(id, "{" + str(msg.author) + "}\n" + msg.content, id)
|
138 |
await msg.reply(json.loads("{" + r.text.split("finalAnswer")[-1][2:].strip())["text"].strip())
|
139 |
-
|
140 |
|
141 |
client.run(os.environ["TOKEN"])
|
|
|
128 |
@client.event
|
129 |
async def on_ready():
|
130 |
print("Ready!")
|
131 |
+
synced = await client.tree.sync()
|
132 |
|
133 |
@client.event
|
134 |
async def on_message_create(msg):
|
|
|
137 |
cookie, id = f.read().split("\n")
|
138 |
r = await chat(id, "{" + str(msg.author) + "}\n" + msg.content, id)
|
139 |
await msg.reply(json.loads("{" + r.text.split("finalAnswer")[-1][2:].strip())["text"].strip())
|
|
|
140 |
|
141 |
client.run(os.environ["TOKEN"])
|