-
Notifications
You must be signed in to change notification settings - Fork 24
/
main.py
38 lines (30 loc) · 1002 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Creator : https://GitHub.com/BXBotz >< https://telegram.me/BX_Botz [@BXBotz]
import os
from pyrogram import Client, filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from config import Config
Telegram = Client(
"Telegram ID Bot",
bot_token = os.environ["BOT_TOKEN"],
api_id = int(os.environ["API_ID"]),
api_hash = os.environ["API_HASH"]
)
@Telegram.on_message(filters.private & filters.command(["start"]))
async def start(bot, update):
text = START_TEXT.format(update.from_user.id)
reply_markup = START_BUTTON
await update.reply_text(
text=text,
disable_web_page_preview=True,
reply_markup=reply_markup,
quote=True
)
# COMMANDS
START_TEXT = """🆔 Your Telegram ID : `{}`"""
# BUTTONS
START_BUTTON = InlineKeyboardMarkup(
[[
InlineKeyboardButton('♻️ Updates Channel ♻️', url=f"https://telegram.me/{Config.UPDATE_CHANNEL}")
]]
)
Telegram.run()