move defaults to the separate module
This commit is contained in:
parent
abe38388b6
commit
df3a990614
4 changed files with 6 additions and 13 deletions
3
pgbot
3
pgbot
|
@ -7,6 +7,7 @@ import threading
|
|||
import telethon
|
||||
import yaml
|
||||
|
||||
import pgbotlib.defaults
|
||||
import pgbotlib.dbstuff
|
||||
import pgbotlib.commands
|
||||
import pgbotlib.cron
|
||||
|
@ -15,7 +16,7 @@ import pgbotlib.response
|
|||
|
||||
|
||||
def init(args: list) -> tuple:
|
||||
conf_path = args[0] if args else pgbotlib.misc.Paths.CONFIG
|
||||
conf_path = args[0] if args else pgbotlib.defaults.CONFIG
|
||||
try:
|
||||
with open(conf_path, 'r', encoding='utf-8') as data:
|
||||
config = yaml.safe_load(data.read())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue