forked from TeamUltroid/UltroidAddons
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathptrigger.py
More file actions
27 lines (24 loc) · 974 Bytes
/
ptrigger.py
File metadata and controls
27 lines (24 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Coded by t.me/Fusuf #
# Please ask before kang #
# 2020 @AsenaUserBot #
# Ported for Ultroid
from requests import get
from os import remove
from telegraph import upload_file as uplu
from . import *
@ultroid_cmd(pattern="ptrigger$")
async def ptrigger(event):
if not event.is_reply:
return await event.edit('**Reply to a Message!**')
msg = await eor(event, "`Processing...`")
reply = await event.get_reply_message()
foto = await ultroid_bot.download_profile_photo(reply.from_id.user_id)
if foto == None:
return await msg.edit("`Replied User dont have Profile Photo !`")
avatar = uplu(foto)
r = get(f"https://some-random-api.ml/canvas/triggered?avatar=https://telegra.ph{avatar[0]}", allow_redirects=True)
open('triggered.gif', 'wb').write(r.content)
await ultroid_bot.send_file(event.chat_id, "triggered.gif", caption="**Trigerred**", reply_to=reply)
await msg.delete()
remove(foto)
remove("triggered.gif")