forked from m4mallu/inline-tube-mate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample_config.py
40 lines (30 loc) · 1.2 KB
/
sample_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
# !/usr/bin/env python3
# -*- coding: utf-8 -*-
# Name : inline-tube-mate [ Telegram ]
# Repo : https://github.com/m4mallu/inine-tube-mate
# Author : Renjith Mangal [ https://t.me/space4renjith ]
# Credits : https://github.com/SpEcHiDe/AnyDLBot
import os
import logging
logging.basicConfig(
level=logging.INFO,
format="[%(asctime)s - %(levelname)s] - %(message)s",
datefmt='%d-%b-%y %H:%M:%S'
)
logging.getLogger("pyrogram").setLevel(logging.WARNING)
class Config(object):
# Get a bot token from botfather
TG_BOT_TOKEN = os.environ.get("TG_BOT_TOKEN", "")
# Get from my.telegram.org
APP_ID = int(os.environ.get("APP_ID", ""))
# Get from my.telegram.org
API_HASH = os.environ.get("API_HASH", "")
# Authorized user ids to use this bot
AUTH_USERS = set(int(x) for x in os.environ.get("AUTH_USERS", "").split())
# proxy for accessing youtube-dl in GeoRestricted Areas
# Get your own proxy from https://github.com/rg3/youtube-dl/issues/1091#issuecomment-230163061
HTTP_PROXY = os.environ.get("HTTP_PROXY", "")
# Telegram maximum file upload size
TG_MAX_FILE_SIZE = 2097152000
def LOGGER(name: str) -> logging.Logger:
return logging.getLogger(name)