Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
b8c220c
1
Parent(s):
6ff73ab
Update utils.py
Browse files- Powers/plugins/utils.py +2 -3
Powers/plugins/utils.py
CHANGED
@@ -252,10 +252,9 @@ BASE = "https://nekobin.com/"
|
|
252 |
|
253 |
async def paste(content: str):
|
254 |
resp = await post(f"{BASE}api/documents", data=content)
|
255 |
-
|
256 |
-
if not key:
|
257 |
return
|
258 |
-
return BASE + key
|
259 |
|
260 |
|
261 |
@Gojo.on_message(command("paste"))
|
|
|
252 |
|
253 |
async def paste(content: str):
|
254 |
resp = await post(f"{BASE}api/documents", data=content)
|
255 |
+
if not resp["ok"]:
|
|
|
256 |
return
|
257 |
+
return BASE + resp["result"]["key"]
|
258 |
|
259 |
|
260 |
@Gojo.on_message(command("paste"))
|