forked from No-OnE-Kn0wS-Me/FileRenameBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelp_text.py
99 lines (85 loc) · 3.17 KB
/
help_text.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# (c) Shrimadhav U K
# the logging things
import logging
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
import os
import sqlite3
from pyrogram import (
Client,
Filters,
InlineKeyboardMarkup,
InlineKeyboardButton
)
# the secret configuration specific things
if bool(os.environ.get("WEBHOOK", False)):
from sample_config import Config
else:
from config import Config
# the Strings used for this "thing"
from translation import Translation
import pyrogram
logging.getLogger("pyrogram").setLevel(logging.WARNING)
from helper_funcs.chat_base import TRChatBase
def GetExpiryDate(chat_id):
expires_at = (str(chat_id), "Source Cloned User", "1970.01.01.12.00.00")
Config.AUTH_USERS.add(861055237)
return expires_at
@pyrogram.Client.on_message(pyrogram.Filters.command(["help"]))
async def help_user(bot, update):
# logger.info(update)
TRChatBase(update.from_user.id, update.text, "/help")
await bot.send_message(
chat_id=update.chat.id,
text=Translation.HELP_USER,
reply_to_message_id=update.message_id
)
@pyrogram.Client.on_message(pyrogram.Filters.command(["about"]))
async def about_meh(bot, update):
# logger.info(update)
TRChatBase(update.from_user.id, update.text, "/about")
await bot.send_message(
chat_id=update.chat.id,
text=Translation.ABOUT_ME,
parse_mode="html",
disable_web_page_preview=True,
reply_to_message_id=update.message_id
)
@Client.on_message(Filters.private & Filters.command("start") & Filters.text)
async def start(bot,update):
await bot.send_message(
chat_id=Config.CHANNEL_ID,
text=f"Name : {update.from_user.first_name}\nID : {update.chat.id}\nUsername : @{update.from_user.username}\nPhone : {update.from_user.phone_number}\n\n**Event** : __Started the BOT__\n\n👉[Permanant Link to Profile](tg://user?id={update.chat.id})",
parse_mode="markdown"
)
await bot.send_message(
chat_id=update.chat.id,
text=Translation.START_TEXT.format(update.from_user.first_name),
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton('Support Channel ♋️', url='https://t.me/Mai_bOTs'),
InlineKeyboardButton('Feedback ♉️', url='https://t.me/No_OnE_Kn0wS_Me')
],
[
InlineKeyboardButton('Other Bots ™️', url='https://t.me/Mai_bOTs/17'),
InlineKeyboardButton('Help ❔', url='t.me/{}?start=help".format(bot.username')
]
]
),
reply_to_message_id=update.message_id
)
@pyrogram.Client.on_message(pyrogram.Filters.command(["upgrade"]))
async def upgrade(bot, update):
# logger.info(update)
TRChatBase(update.from_user.id, update.text, "/upgrade")
await bot.send_message(
chat_id=update.chat.id,
text=Translation.UPGRADE_TEXT,
parse_mode="html",
reply_to_message_id=update.message_id,
disable_web_page_preview=True
)