forked from Ertugrul-Movie-Bot/Ertugrul-Movie-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
94 lines (41 loc) · 2.01 KB
/
config.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
import os
import re
import time
class Config(object):
# Get a bot token from botfather
TG_BOT_TOKEN = os.environ.get("TG_BOT_TOKEN", "")
# Get from my.telegram.org (or @UseTGXBot)
API_ID = int(os.environ.get("API_ID", 12345))
# Get from my.telegram.org (or @UseTGXBot)
API_HASH = os.environ.get("API_HASH", "")
# Database URL from https://cloud.mongodb.com/
DATABASE_URI = os.environ.get("DATABASE_URI", "")
# Your database name from mongoDB
DATABASE_NAME = str(os.environ.get("DATABASE_NAME", "Cluster0"))
# ID of users that can use the bot commands
AUTH_USERS = set(str(x) for x in os.environ.get("AUTH_USERS", "").split())
# To save user details (Usefull for getting userinfo and total user counts)
# May reduce filter capacity :(
# Give yes or no
SAVE_USER = os.environ.get("SAVE_USER", "no").lower()
# Go to https://dashboard.heroku.com/account, scroll down and press Reveal API
# To check dyno status
HEROKU_API_KEY = os.environ.get("HEROKU_API_KEY", "")
# OPTIONAL - To set alternate BOT COMMANDS
ADD_FILTER_CMD = os.environ.get("ADD_FILTER_CMD", "add")
DELETE_FILTER_CMD = os.environ.get("DELETE_FILTER_CMDD", "del")
DELETE_ALL_CMD = os.environ.get("DELETE_ALL_CMDD", "delall")
CONNECT_COMMAND = os.environ.get("CONNECT_COMMANDD", "connect")
SESSION = os.environ.get("SESSION_STRING", "")
CHAT = os.environ.get("CHAT", "")
LOG_GROUP = os.environ.get("LOG_GROUP", "")
if LOG_GROUP:
LOG_GROUP = int(LOG_GROUP)
else:
LOG_GROUP = None
ADMIN = os.environ.get("ADMINS", "1815494853")
ADMINS = [int(admin) if re.search('^\d+$', admin) else admin for admin in (ADMIN).split()]
DISCONNECT_COMMAND = os.environ.get("DISCONNECT_COMMANDD", "disconnect")
# To record start time of bot
BOT_START_TIME = time.time()
STREAM_URL = os.environ.get("STREAM_URL", "https://radioindia.net/radio/hungamanow/icecast.audio")