-
Notifications
You must be signed in to change notification settings - Fork 0
/
typing.py
33 lines (26 loc) · 851 Bytes
/
typing.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
# oreo
"""
✘ Commands Available -
• `{i}type <msg>`
Edits the Message and shows like someone is typing.
"""
import asyncio
from . import *
@oreo_cmd(pattern="type ?(.*)", fullsudo=True)
async def _(event):
input_str = event.pattern_match.group(1)
if not input_str:
return await event.eor("Give me something to type !")
shiiinabot = "\u2060" * 602
okla = await event.eor(shiiinabot)
typing_symbol = "|"
previous_text = ""
await okla.edit(typing_symbol)
await asyncio.sleep(0.4)
for character in input_str:
previous_text = previous_text + "" + character
typing_text = previous_text + "" + typing_symbol
await okla.edit(typing_text)
await asyncio.sleep(0.4)
await okla.edit(previous_text)
await asyncio.sleep(0.4)