chore(userbot): apply ruff check --fix and ruff format
- ruff check --fix: 210 auto-fixed errors (import sorting, trailing whitespace, unused imports, f-string fixups, deprecated annotations) - ruff format: 104 files reformatted to consistent style - 268 non-auto-fixable issues remain (S113 requests timeout, etc.)
This commit is contained in:
+5
-8
@@ -15,20 +15,17 @@
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import asyncio
|
||||
import time
|
||||
|
||||
from pyrogram import Client, filters
|
||||
from pyrogram.errors import FloodWait
|
||||
from pyrogram.types import Message
|
||||
|
||||
from utils.misc import modules_help, prefix
|
||||
|
||||
|
||||
@Client.on_message(filters.command(["type", "typewriter"], prefix) & filters.me)
|
||||
@Client.on_message(filters.command(['type', 'typewriter'], prefix) & filters.me)
|
||||
async def type_cmd(_, message: Message):
|
||||
text = message.text.split(maxsplit=1)[1]
|
||||
typed = ""
|
||||
typing_symbol = "▒"
|
||||
typed = ''
|
||||
typing_symbol = '▒'
|
||||
|
||||
for char in text:
|
||||
await message.edit(typed + typing_symbol)
|
||||
@@ -38,6 +35,6 @@ async def type_cmd(_, message: Message):
|
||||
await asyncio.sleep(0.1)
|
||||
|
||||
|
||||
modules_help["type"] = {
|
||||
"type</code> <code>| </code><code>typewriter [text]*": "Typing emulation. Don't use a lot of characters, you can receive a lot of floodwaits!"
|
||||
modules_help['type'] = {
|
||||
'type</code> <code>| </code><code>typewriter [text]*': "Typing emulation. Don't use a lot of characters, you can receive a lot of floodwaits!"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user