· 6 years ago · Apr 24, 2019, 09:16 PM
1# -*- coding: utf-8 -*-
2#
3# config.py
4#
5#
6
7import os.path
8
9HOST_URL = 'https://YOUR-BASE-URL-FOR-WEBHOOK'
10
11BOT_NAME = 'Odin'
12BOT_USERNAME = 'odin_2020_bot'
13BOT_ID = THE_BOT_INTEGER_ID
14BOT_TOKEN = 'THE_BOT_TOKEN' # it is a combination of the form BOT_ID:PASS_PHRASE
15
16BOT_PROFILE_LINK = 't.me/odin_2020_bot'
17
18# you can obtain a unique value by :
19# import uuid
20# uuid.uuid4().hex
21# Remember, that you should run this code in interactive python, and copy and paste the value obtained here
22# for example, SECRET_KEY = '6303ff14624646bc976a2591be029f82'
23SECRET_KEY = 'a hexadecimal string' # it's a pre-generated UUID in hex format
24
25# if you are not familiar with python3.6 f-string, the following line is equivalent to
26#
27# WEBHOOK_ROUTE = '/odin/{SECRET_KEY}'.format(SECRET_KEY=SECRET_KEY)
28#
29# or simply :
30#
31# WEBHOOK_ROUTE = '/odin/{}'.format(SECRET_KEY)
32WEBHOOK_ROUTE = f'/odin/{SECRET_KEY}'
33
34PROJECT = 'monobot' # or the name of your choice
35APT_PATH = os.path.dirname(os.path.realpath(__file__))
36
37PROXY_URL = 'YOUR PROXY URL' or None
38
39
40# It's handy. Let the bot sometimes report to you something!
41ADMIN_ID = MY_TELEGRAM_INTEGER_ID