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

View file

@ -4,6 +4,7 @@ import telethon
import yaml
import pgbotlib.api
import pgbotlib.dbstuff
import pgbotlib.defaults
import pgbotlib.misc
@ -31,7 +32,7 @@ class Responder:
self.apiregex = re.compile(r'^\{(\w+)\}(.+)?$')
self.namegen = pgbotlib.misc.NameGenerator(config, db_connection)
self.tokens = get_tokens(
config.get('response_tokens', pgbotlib.misc.Paths.TOKENS)
config.get('response_tokens', pgbotlib.defaults.TOKENS)
)
self.chats = config['chats']
self.api = pgbotlib.api.ApiWrapper(self.tokens, db_connection)