Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
Β·
d0b1f31
1
Parent(s):
49bf1cd
....
Browse files- Powers/plugins/utils.py +6 -2
Powers/plugins/utils.py
CHANGED
|
@@ -332,9 +332,13 @@ async def paste_func(_, message: Message):
|
|
| 332 |
content = fdata
|
| 333 |
|
| 334 |
remove(doc)
|
| 335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
if not link:
|
| 337 |
-
await m.
|
| 338 |
return
|
| 339 |
kb = [[InlineKeyboardButton(text="π Paste π", url=link + f".{exe}")]]
|
| 340 |
await m.delete()
|
|
|
|
| 332 |
content = fdata
|
| 333 |
|
| 334 |
remove(doc)
|
| 335 |
+
try:
|
| 336 |
+
link = paste(content)
|
| 337 |
+
except Exception as e:
|
| 338 |
+
await m.edit_text(e)
|
| 339 |
+
return
|
| 340 |
if not link:
|
| 341 |
+
await m.edit_text("Failed to post!")
|
| 342 |
return
|
| 343 |
kb = [[InlineKeyboardButton(text="π Paste π", url=link + f".{exe}")]]
|
| 344 |
await m.delete()
|