summaryrefslogtreecommitdiff
path: root/config.py
diff options
context:
space:
mode:
authorTianhao Wang <shrik3@riseup.net>2023-03-29 14:27:53 +0200
committerTianhao Wang <shrik3@riseup.net>2023-03-29 14:27:53 +0200
commit04c0fd709b868400a826bca05c679a8c4f1abb8d (patch)
treec2af369e9b3ec53f011db93350fcc505a31b354c /config.py
parent7c19ce4ea2c9ae542d743cbdd19e4c0fcf4e3daa (diff)
add sqlite3 support
Diffstat (limited to 'config.py')
-rw-r--r--config.py16
1 files changed, 14 insertions, 2 deletions
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"