Pass if no .env found

This commit is contained in:
Amit Sharma
2023-05-16 09:20:12 +05:30
committed by GitHub
parent bba9fbe095
commit b19a496276

View File

@@ -89,8 +89,10 @@ async def autoupdate_local_database():
def update_envs():
"""Update Var. attributes to udB"""
from .. import udB
for envs in [*list(os.environ), *list(RepositoryEnv(config._find_file(".")).data)]:
_envs = [*list(os.environ)]
if ".env" in os.listdir("."):
[_envs.append(_) for _ in list(RepositoryEnv(config._find_file(".")).data)]
for envs in _envs:
if (
envs in ["LOG_CHANNEL", "BOT_TOKEN", "BOTMODE", "DUAL_MODE", "language"]
or envs in udB.keys()