Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
0bcf3b4
1
Parent(s):
9ad8a7b
revert
Browse files- Powers/plugins/utils.py +2 -7
Powers/plugins/utils.py
CHANGED
|
@@ -252,10 +252,8 @@ BASE = "https://nekobin.com/"
|
|
| 252 |
|
| 253 |
async def paste(content: str):
|
| 254 |
resp = await post(f"{BASE}api/documents", data=content)
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
except Exception as e:
|
| 258 |
-
return str(e)
|
| 259 |
return BASE + resp["result"]["key"]
|
| 260 |
|
| 261 |
|
|
@@ -289,9 +287,6 @@ async def paste_func(_, message: Message):
|
|
| 289 |
remove(doc)
|
| 290 |
|
| 291 |
link = await paste(content)
|
| 292 |
-
if len(link.split()) != 1:
|
| 293 |
-
await m.delete()
|
| 294 |
-
return await message.reply_text(f"While posting got an error:\n{e}")
|
| 295 |
kb = [[InlineKeyboardButton(text="Paste Link ", url=link)]]
|
| 296 |
await m.delete()
|
| 297 |
try:
|
|
|
|
| 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 |
|
|
|
|
| 287 |
remove(doc)
|
| 288 |
|
| 289 |
link = await paste(content)
|
|
|
|
|
|
|
|
|
|
| 290 |
kb = [[InlineKeyboardButton(text="Paste Link ", url=link)]]
|
| 291 |
await m.delete()
|
| 292 |
try:
|