get rid of defaults, hardcode stuff instead, also use os.chdir into config dir

This commit is contained in:
Von Random 2024-11-10 00:37:41 +02:00
parent acc390ef11
commit 9eeabd8ae9
4 changed files with 7 additions and 17 deletions

View file

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