move defaults to the separate module
This commit is contained in:
parent
abe38388b6
commit
df3a990614
4 changed files with 6 additions and 13 deletions
|
@ -4,6 +4,7 @@ import random
|
|||
import yaml
|
||||
import aiocron
|
||||
import telethon
|
||||
import pgbotlib.defaults
|
||||
import pgbotlib.response
|
||||
import pgbotlib.misc
|
||||
|
||||
|
@ -13,7 +14,7 @@ class Cron:
|
|||
config: dict,
|
||||
client: telethon.TelegramClient,
|
||||
responder: pgbotlib.response.Responder) -> None:
|
||||
schedule_conf = config.get('schedule', pgbot.misc.Paths.SCHEDULE)
|
||||
schedule_conf = config.get('schedule', pgbotlib.defaults.SCHEDULE)
|
||||
with open(schedule_conf, 'r', encoding='utf-8') as data:
|
||||
self.sched = yaml.safe_load(data.read())
|
||||
self.responder = responder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue