Captain Ezio commited on
Commit
9a61ff4
ยท
1 Parent(s): f3d4252
Files changed (1) hide show
  1. 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
- link = paste(content)
 
 
 
 
336
  if not link:
337
- await m.reply_text("Failed to post!")
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()