Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
933bee9
1
Parent(s):
4e1b85a
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"))
|