Files
Ultroid-fork/plugins/fakeaction.py
Akash Pattnaik 7eb5e58721 Release v0.0.6
Co-authored-by: Aakash <BLUE-DEVIL1134@users.noreply.github.com>
Co-authored-by: Aditya <me@xditya.me>
Co-authored-by: Danish <danish@ultroid.tech>
Co-authored-by: buddhhu <buddhuu@users.noreply.github.com>
Co-authored-by: sppidy <sppidy@users.noreply.github.com>
Co-authored-by: Arnab Paryali <Arnabxd@users.noreply.github.com>
Co-authored-by: divkix <divkix@users.noreply.github.com>
Co-authored-by: hellboi_atul <hellboi-atul@users.noreply.github.com>
Co-authored-by: Programming Error <error@notavailable.live>
Co-authored-by: New-dev0 <New-dev0@notavailable.live>
2021-05-08 18:37:32 +05:30

76 lines
1.9 KiB
Python

# Ultroid - UserBot
# Copyright (C) 2020 TeamUltroid
#
# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
# PLease read the GNU Affero General Public License in
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
"""
✘ Commands Available -
• `{i}ftyping <time/in secs>`
`Show Fake Typing in current chat. `
• `{i}faudio <time/in secs>`
`Show Fake Recording Action in current chat. `
• `{i}fvideo <time/in secs>`
`Show Fake video action in current chat. `
• `{i}fgame <time/in secs>`
`Show Fake Game Playing Action in current chat. `
"""
from . import *
@ultroid_cmd(pattern="ftyping ?(.*)")
async def _(e):
t = e.pattern_match.group(1)
if not (t or t.isdigit()):
t = 100
else:
t = int(t)
await eod(e, f"Starting Fake Typing For {t} sec.")
async with e.client.action(e.chat_id, "typing"):
await asyncio.sleep(t)
@ultroid_cmd(pattern="faudio ?(.*)")
async def _(e):
t = e.pattern_match.group(1)
if not (t or t.isdigit()):
t = 100
else:
t = int(t)
await eod(e, f"Starting Fake audio recording For {t} sec.")
async with e.client.action(e.chat_id, "record-audio"):
await asyncio.sleep(t)
@ultroid_cmd(pattern="fvideo ?(.*)")
async def _(e):
t = e.pattern_match.group(1)
if not (t or t.isdigit()):
t = 100
else:
t = int(t)
await eod(e, f"Starting Fake video recording For {t} sec.")
async with e.client.action(e.chat_id, "record-video"):
await asyncio.sleep(t)
@ultroid_cmd(pattern="fgame ?(.*)")
async def _(e):
t = e.pattern_match.group(1)
if not (t or t.isdigit()):
t = 100
else:
t = int(t)
await eod(e, f"Starting Fake Game Playing For {t} sec.")
async with e.client.action(e.chat_id, "game"):
await asyncio.sleep(t)
HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})