Spaces:
Running
Running
Captain Ezio
commited on
Commit
·
20340c7
1
Parent(s):
f865f48
Update utils.py
Browse files- Powers/plugins/utils.py +2 -14
Powers/plugins/utils.py
CHANGED
@@ -293,22 +293,10 @@ async def paste_func(_, message: Message):
|
|
293 |
link = await paste(content)
|
294 |
kb = [[InlineKeyboardButton(text="Paste Link ", url=link)]]
|
295 |
try:
|
296 |
-
if message.from_user.is_bot:
|
297 |
-
await message.reply_photo(
|
298 |
-
photo=link,
|
299 |
-
quote=False,
|
300 |
-
caption="Pasted",
|
301 |
-
reply_markup=InlineKeyboardMarkup(kb),
|
302 |
-
)
|
303 |
-
else:
|
304 |
-
await message.reply_photo(
|
305 |
-
photo=link,
|
306 |
-
quote=False,
|
307 |
-
caption=f"**Paste Link:** [Here]({link})"
|
308 |
-
)
|
309 |
await m.delete()
|
310 |
-
except Exception:
|
311 |
await message.reply_text("Here's your paste", reply_markup=InlineKeyboardMarkup(kb))
|
|
|
|
|
312 |
return
|
313 |
|
314 |
@Gojo.on_message(command("tr"))
|
|
|
293 |
link = await paste(content)
|
294 |
kb = [[InlineKeyboardButton(text="Paste Link ", url=link)]]
|
295 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
await m.delete()
|
|
|
297 |
await message.reply_text("Here's your paste", reply_markup=InlineKeyboardMarkup(kb))
|
298 |
+
except Exception:
|
299 |
+
await message.reply_text(f"Here's your paste [link]({link})",)
|
300 |
return
|
301 |
|
302 |
@Gojo.on_message(command("tr"))
|