<filename>bot.py
# Made with Python3
# (C) Vivek-TP and FayasNoushad

import os
from pyrogram import Client, filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton

Bot = Client(
        "Info Bot",
        bot_token = os.environ["BOT_TOKEN"],
        api_id = int(os.environ["API_ID"]),
        api_hash = os.environ["API_HASH"]
)

START_TEXT = """
<b>HAI {}
I AM A BOT I CAN SIMPLY GATHER ID OF AN PERSON ON TELEGRAM <b> 

"""
HELP_TEXT = """
MAY BE I THINK YOU HAVE SOME DOUBTS THAT HOW TO USE ME.

ITS SIMPLE JUST FORWARD THE MESSAGE FROM THE PERSON OR CHANNEL YOU WANT TO GET ID. 
"""
ABOUT_TEXT = """
- **Bot :** `Info Bot`
- **Creator :** [Vivek](https://telegram.me/Vivek_KERALA)
- **Credits :** `Everyone in this journey`
- **Source :** [Click here](https://github.com/vivek-tp/Info-Bot)
- **Language :** [Python3](https://python.org)
- **Library :** [Pyrogram v1.2.0](https://pyrogram.org)
- **Server :** [Heroku](https://heroku.com)
"""

BOT_BUTTONS = InlineKeyboardMarkup(
        [[
        InlineKeyboardButton(text="UPDATES", url=f"https://t.me/NAZRIYAUPDATES"),
        InlineKeyboardButton(text="SUPPORT", url=f"https://t.me/NAZRIYASUPPORT") 
        ]]
    )


START_BUTTONS = InlineKeyboardMarkup(
        [[
        InlineKeyboardButton(text="UPDATES", url=f"https://t.me/NAZRIYAUPDATES"),
        InlineKeyboardButton(text="SUPPORT", url=f"https://t.me/NAZRIYASUPPORT")
        ]]
    )

HELP_BUTTONS = InlineKeyboardMarkup(
        [[
        InlineKeyboardButton(text="UPDATES", url=f"https://t.me/NAZRIYAUPDATES"),
        InlineKeyboardButton(text="SUPPORT", url=f"https://t.me/NAZRIYASUPPORT")
        ]]
    )

ABOUT_BUTTONS = InlineKeyboardMarkup(
        [[
        InlineKeyboardButton(text="UPDATES", url=f"https://t.me/NAZRIYAUPDATES"),
        InlineKeyboardButton(text="SUPPORT", url=f"https://t.me/NAZRIYASUPPORT")
        ]]
    )
                
@Bot.on_message(filters.private & filters.command("start"))
async def start(bot, update):
    text = START_TEXT.format(update.from_user.mention) 
    reply_markup = START_BUTTONS
    await update.reply_text(
        text=text,
        disable_web_page_preview=True,
        reply_markup=reply_markup
    )

@Bot.on_message(filters.private & filters.command("help"))
async def help(bot, update):
    text = HELP_TEXT
    reply_markup = HELP_BUTTONS
    await update.reply_text(
        text=text,
        disable_web_page_preview=True,
        reply_markup=reply_markup
    )


@Bot.on_message(filters.private & filters.command("about"))
async def about(bot, update):
    text = ABOUT_TEXT
    reply_markup = ABOUT_BUTTONS
    await update.reply_text(
        text=text,
        disable_web_page_preview=True,
        reply_markup=reply_markup
    )

@Bot.on_message(filters.private & filters.command("info"))
async def info(bot, update):
    if update.from_user.last_name:
        last_name = update.from_user.last_name
    else:
        last_name = "None"
    text = f"""
**🙋🏻‍♂️ First Name :** {update.from_user.first_name}

**🧖‍♂️ Your Second Name :** {last_name}

**🧑🏻‍🎓 Your Username :** {update.from_user.username}

**🆔 Your Telegram ID :** {update.from_user.id}

**🔗 Your Profile Link :** {update.from_user.mention}
""" 
    reply_markup = BOT_BUTTONS
    await update.reply_text(        
        text=text,
        disable_web_page_preview=True,
        reply_markup=reply_markup
    )

@Bot.on_message(filters.private & filters.command("id"))
async def id(bot, update):
    text = f"""
**Your Telegram ID :** {update.from_user.id}
"""
    reply_markup = BOT_BUTTONS
    await update.reply_text(        
        text=text,
        disable_web_page_preview=True,
        reply_markup=reply_markup
    )

Bot.run()
