Ошибка в коде
Pyrogram v1.1.13, Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)
Сам код
from pyrogram import Client, filters
from pyrogram.errors import FloodWait
from pyrogram.types import ChatPermissions
import time
from time import sleep
import random
app = Client("my_account")
# Команда type
@app.on_message(filters.command("t", prefixes=".") & filters.me)
def type(_, msg):
orig_text = msg.text.split(".t", maxsplit=1)[1]
text = orig_text
tbp = "" # to be printed
typing_symbol = "▒"
while(tbp != orig_text):
try:
msg.edit(tbp + typing_symbol)
sleep(0.005) # 50 ms
tbp = tbp + text[0]
text = text[1:]
msg.edit(tbp)
sleep(0.005)
except FloodWait as e:
sleep(e.x)
app.run()