Skip to content

Commit

Permalink
Hotfix for those who issued userbot fall with incorrect config set
Browse files Browse the repository at this point in the history
  • Loading branch information
hikariatama committed May 19, 2022
1 parent 059d531 commit 3453fb9
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions hikka/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,15 +611,18 @@ def send_config_one(
{},
)
for conf in mod.config.keys():
mod.config[conf] = (
modcfg[conf]
if conf in modcfg.keys()
else os.environ.get(
f"{mod.__class__.__name__}.{conf}",
None,
try:
mod.config[conf] = (
modcfg[conf]
if conf in modcfg.keys()
else os.environ.get(
f"{mod.__class__.__name__}.{conf}",
None,
)
or mod.config.getdef(conf)
)
or mod.config.getdef(conf)
)
except validators.ValidationError:
pass

if skip_hook:
return
Expand Down

0 comments on commit 3453fb9

Please sign in to comment.