forked from waifu/kemoverse
Move database location to config
This commit is contained in:
parent
bb5065d523
commit
475ee1cc90
3 changed files with 8 additions and 2 deletions
|
@ -11,6 +11,9 @@ KEY = config['application']['ApiKey']
|
||||||
# Bot's Misskey instance URL
|
# Bot's Misskey instance URL
|
||||||
INSTANCE = config['application']['InstanceUrl']
|
INSTANCE = config['application']['InstanceUrl']
|
||||||
|
|
||||||
|
# SQLite Database location
|
||||||
|
DB_PATH = config['application']['DatabaseLocation']
|
||||||
|
|
||||||
# Extra stuff for control of the bot
|
# Extra stuff for control of the bot
|
||||||
|
|
||||||
# TODO: move this to db
|
# TODO: move this to db
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import random
|
import random
|
||||||
|
import config
|
||||||
|
|
||||||
# TODO: grab this from a config file instead
|
DB_PATH = config.DB_PATH
|
||||||
DB_PATH = "./gacha_game.db" # Adjust if needed
|
|
||||||
|
|
||||||
def get_db_connection():
|
def get_db_connection():
|
||||||
'''Creates a connection to the database'''
|
'''Creates a connection to the database'''
|
||||||
|
|
|
@ -12,3 +12,6 @@ InstanceUrl = http://example.tld
|
||||||
|
|
||||||
; Comma separated list of fedi handles for any administrator users
|
; Comma separated list of fedi handles for any administrator users
|
||||||
DefaultAdmins = ['admin@example.tld']
|
DefaultAdmins = ['admin@example.tld']
|
||||||
|
|
||||||
|
; SQLite Database location
|
||||||
|
DatabaseLocation = ./gacha_game.db
|
Loading…
Add table
Reference in a new issue