move defaults to the separate module

This commit is contained in:
Von Random 2024-10-23 14:35:36 +03:00
parent abe38388b6
commit df3a990614
4 changed files with 6 additions and 13 deletions

3
pgbot
View file

@ -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())