Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
ff93c3b
1
Parent(s):
db625d5
Update vars.py
Browse files- Powers/vars.py +20 -19
Powers/vars.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
from os import getcwd
|
|
|
|
| 2 |
|
| 3 |
from prettyconf import Configuration
|
| 4 |
from prettyconf.loaders import EnvFile, Environment
|
| 5 |
|
| 6 |
-
env_file = f"{getcwd()}/.env"
|
| 7 |
-
config = Configuration(loaders=[Environment(), EnvFile(filename=env_file)])
|
| 8 |
|
| 9 |
|
| 10 |
|
|
@@ -12,23 +13,23 @@ class Config:
|
|
| 12 |
"""Config class for variables."""
|
| 13 |
|
| 14 |
LOGGER = True
|
| 15 |
-
BOT_TOKEN =
|
| 16 |
-
API_ID = int(
|
| 17 |
-
API_HASH =
|
| 18 |
-
OWNER_ID = int(
|
| 19 |
-
MESSAGE_DUMP = int(
|
| 20 |
-
DEV_USERS = [int(i) for i in
|
| 21 |
-
SUDO_USERS = [int(i) for i in
|
| 22 |
-
WHITELIST_USERS = [int(i) for i in
|
| 23 |
-
DB_URI =
|
| 24 |
-
DB_NAME =
|
| 25 |
-
NO_LOAD =
|
| 26 |
-
PREFIX_HANDLER =
|
| 27 |
-
SUPPORT_GROUP =
|
| 28 |
-
SUPPORT_CHANNEL =
|
| 29 |
-
ENABLED_LOCALES = [str(i) for i in
|
| 30 |
-
VERSION =
|
| 31 |
-
WORKERS = int(
|
| 32 |
BOT_USERNAME = ""
|
| 33 |
BOT_ID = ""
|
| 34 |
BOT_NAME = ""
|
|
|
|
| 1 |
from os import getcwd
|
| 2 |
+
import os
|
| 3 |
|
| 4 |
from prettyconf import Configuration
|
| 5 |
from prettyconf.loaders import EnvFile, Environment
|
| 6 |
|
| 7 |
+
#env_file = f"{getcwd()}/.env"
|
| 8 |
+
#config = Configuration(loaders=[Environment(), EnvFile(filename=env_file)])
|
| 9 |
|
| 10 |
|
| 11 |
|
|
|
|
| 13 |
"""Config class for variables."""
|
| 14 |
|
| 15 |
LOGGER = True
|
| 16 |
+
BOT_TOKEN = environ.get("BOT_TOKEN", default=None)
|
| 17 |
+
API_ID = int(environ.get("API_ID", default=None))
|
| 18 |
+
API_HASH = environ.get("API_HASH", default=None)
|
| 19 |
+
OWNER_ID = int(environ.get("OWNER_ID", default=1344569458))
|
| 20 |
+
MESSAGE_DUMP = int(environ.get("MESSAGE_DUMP", default=-100))
|
| 21 |
+
DEV_USERS = [int(i) for i in environ.get("DEV_USERS", default="1432756163 1344569458 1355478165 1789859817 1777340882").split(" ")]
|
| 22 |
+
SUDO_USERS = [int(i) for i in environ.get("SUDO_USERS", default="1432756163 1344569458 1355478165 1789859817 1777340882").split(" ")]
|
| 23 |
+
WHITELIST_USERS = [int(i) for i in environ.get("WHITELIST_USERS", default="1432756163 1344569458 1355478165 1789859817 1777340882").split(" ")]
|
| 24 |
+
DB_URI = environ.get("DB_URI", default="")
|
| 25 |
+
DB_NAME = environ.get("DB_NAME", default="Power_robot")
|
| 26 |
+
NO_LOAD = environ.get("NO_LOAD", default="").split()
|
| 27 |
+
PREFIX_HANDLER = environ.get("PREFIX_HANDLER", default="/").split()
|
| 28 |
+
SUPPORT_GROUP = environ.get("SUPPORT_GROUP", default="HellBot_Network")
|
| 29 |
+
SUPPORT_CHANNEL = environ.get("SUPPORT_CHANNEL", default="gojo_updates")
|
| 30 |
+
ENABLED_LOCALES = [str(i) for i in environ.get("ENABLED_LOCALES", default="en").split()]
|
| 31 |
+
VERSION = environ.get("VERSION", default="v2.0")
|
| 32 |
+
WORKERS = int(environ.get("WORKERS", default=16))
|
| 33 |
BOT_USERNAME = ""
|
| 34 |
BOT_ID = ""
|
| 35 |
BOT_NAME = ""
|