From b19a496276126dda10c37d8c9c4e410f91739a19 Mon Sep 17 00:00:00 2001 From: Amit Sharma Date: Tue, 16 May 2023 09:20:12 +0530 Subject: [PATCH] Pass if no .env found --- pyUltroid/startup/funcs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyUltroid/startup/funcs.py b/pyUltroid/startup/funcs.py index 9040173..f5b26ad 100644 --- a/pyUltroid/startup/funcs.py +++ b/pyUltroid/startup/funcs.py @@ -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()