-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.py
74 lines (68 loc) · 2.35 KB
/
commands.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @trojanzhex
from pyrogram import Client, filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from script import script
@Client.on_message(filters.command(["start"]) & filters.private)
async def start(client, message):
try:
await message.reply_text(
text=script.START_MSG.format(message.from_user.mention),
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton("HELP", callback_data="help_data"),
InlineKeyboardButton("ABOUT", callback_data="about_data"),
],
[
InlineKeyboardButton(
"UPDATE CHANNEL", url="https://t.me/BOTS_Infinity")
]
]
),
reply_to_message_id=message.message_id
)
except:
pass
@Client.on_message(filters.command(["help"]) & filters.private)
async def help(client, message):
try:
await message.reply_text(
text=script.HELP_MSG,
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton("BACK", callback_data="start_data"),
InlineKeyboardButton("ABOUT", callback_data="about_data"),
],
[
InlineKeyboardButton(
"SUPPORT", url="https://t.me/botech_lanka")
]
]
),
reply_to_message_id=message.message_id
)
except:
pass
@Client.on_message(filters.command(["about"]) & filters.private)
async def about(client, message):
try:
await message.reply_text(
text=script.ABOUT_MSG,
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton("BACK", callback_data="help_data"),
InlineKeyboardButton("START", callback_data="start_data"),
]
]
),
reply_to_message_id=message.message_id
)
except:
pass