import random, os
from pyrogram import Client, filters, enums
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
@Client.on_message(filters.command(["genpassword", 'genpw']))
async def password(bot, update):
message = await update.reply_text(text="`Pʀᴏᴄᴇꜱꜱɪɴɢ..`")
password = "abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+".lower()
if len(update.command) > 1:
qw = update.text.split(" ", 1)[1]
else:
ST = ["5", "7", "6", "9", "10", "12", "14", "8", "13"]
qw = random.choice(ST)
limit = int(qw)
random_value = "".join(random.sample(password, limit))
txt = f"Lɪᴍɪᴛ: {str(limit)} \nPᴀꜱꜱᴡᴏʀᴅ: {random_value}
"
btn = InlineKeyboardMarkup([[InlineKeyboardButton('Mᴋɴ Bᴏᴛᴢ™️', url='https://t.me/mkn_bots_updates')]])
await message.edit_text(text=txt, reply_markup=btn, parse_mode=enums.ParseMode.HTML)