diff --git a/userbot/modules/memes.py b/userbot/modules/memes.py index e20de0429a..9c7891e69e 100644 --- a/userbot/modules/memes.py +++ b/userbot/modules/memes.py @@ -397,3 +397,28 @@ async def bluetext(e): await e.edit( "`BLUETEXT MUST CLICK.\nAre you a stupid animal which is attracted to colours?`" ) + + +@bot.on(events.NewMessage(pattern='^(?i).type')) +async def typewriter(e): + if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"): + textx = await e.get_reply_message() + message = e.text + + if message[6:]: + message = str(message[6:]) + elif textx: + message = textx + message = str(message.message) + sleep_time = 0.1 + index = 1 + old_text = '' + msg = await e.edit('|') + await asyncio.sleep(sleep_time) + while old_text != message: + old_text = message[:index] + index += 1 + await msg.edit('`%s`' % (old_text + '|')) + await asyncio.sleep(sleep_time) + await msg.edit('`%s`' % (old_text.strip())) + await asyncio.sleep(sleep_time) \ No newline at end of file diff --git a/userbot/modules/package.py b/userbot/modules/package.py index fbb0749a08..337796ef9f 100644 --- a/userbot/modules/package.py +++ b/userbot/modules/package.py @@ -39,7 +39,7 @@ def install_package(package_manager): shell=True) try: - if not 'heroku' in os.environ['PATH']: + if not 'heroku' in os.environ['PATH'] and not os.uname().sysname.lower == 'windows': _start_instalation() except: _start_instalation()