-
Notifications
You must be signed in to change notification settings - Fork 5
/
fake.py
40 lines (33 loc) · 850 Bytes
/
fake.py
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
28
29
30
31
32
33
34
35
36
37
38
39
40
"""Send Chat Actions
Syntax: .fake <option>
fake options: Options for fake
typing
contact
game
location
voice
round
video
photo
document
cancel"""
import asyncio
from ULTRA.utils import admin_cmd
from ULTRA import CMD_HELP
@borg.on(admin_cmd(pattern="fake ?(.*)"))
async def _(event):
if event.fwd_from:
return
await event.delete()
input_str = event.pattern_match.group(1)
action = "typing"
if input_str:
action = input_str
async with borg.action(event.chat_id, action):
await asyncio.sleep(86400) # type for 10 seconds
CMD_HELP.update({
"fake":
".fake (action name)\
\nUsage: Type .fake (action name) this shows the fake action in the group the actions are typing contact ,game, location, voice, round, video,photo,document.\
"
})