From 04c0fd709b868400a826bca05c679a8c4f1abb8d Mon Sep 17 00:00:00 2001 From: Tianhao Wang Date: Wed, 29 Mar 2023 14:27:53 +0200 Subject: add sqlite3 support --- config.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'config.py') diff --git a/config.py b/config.py index c550dfc..985370e 100644 --- a/config.py +++ b/config.py @@ -1,6 +1,7 @@ APPNAME = 'catbot' BASEURL = 'https://vnil.de' +## FEDIVERSE CONFIGS --------------------- # no need to change the following --- CLIENTID = 'client.secret' TOKEN = 'token.secret' @@ -18,11 +19,22 @@ ACCOUNT_SECRET = "account.secret" try: f = open(ACCOUNT_SECRET) lines = f.readlines() - UNAME = lines[0] - PW = lines[1] + UNAME = lines[0].strip() + PW = lines[1].strip() except: print("account secret not found, please manually input:") UNAME = input("username or email") PW = input("password (not concealed)") ADMINS = ["shrik3"] + + + +## DB CONFIGS ----------------------------- +# TODO, currently the bot and the db handler is sharing +# the same set of config, which is not deserable, expecially +# when the bot config has embeded script (the try..except block +# above). For the prototyle I'm keeping it this way. May change +# later. + +DB_NAME = "data/data.db" -- cgit v1.2.3-70-g09d2