summaryrefslogtreecommitdiff
path: root/config.py
blob: 985370eae8da3bbbf5e386fd155fcb8146732703 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
APPNAME = 'catbot'
BASEURL = 'https://vnil.de'

## FEDIVERSE CONFIGS ---------------------
# no need to change the following ---
CLIENTID = 'client.secret'
TOKEN = 'token.secret'

# in seconds
POLL_INTERVAL = 20

# in case of DoS, we won't handle too long a status
MAX_STATUS_LENGTH = 1024

# account username and PW
UNAME = ""
PW = ""
ACCOUNT_SECRET = "account.secret"
try:
    f = open(ACCOUNT_SECRET)
    lines = f.readlines()
    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"