Spaces:
Runtime error
Runtime error
File size: 439 Bytes
55554d9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from pyrogram import filters, enums
from pyrogram.types import Message
from bot import Bot
@Bot.on_message(filters.command("id") & filters.private)
async def showid(client, message):
chat_type = message.chat.type
if chat_type == enums.ChatType.PRIVATE:
user_id = message.chat.id
await message.reply_text(
f"<b>Your User ID Is :</b> <code>{user_id}</code>",
quote=True
)
|