Compare commits

...

2 commits

Author SHA1 Message Date
d5de73cf22 Merge pull request 'Move database location to config' (#10) from dev into master
Reviewed-on: #10
2025-05-18 18:04:58 -03:00
w
475ee1cc90 Move database location to config 2025-05-18 17:28:15 -03:00
3 changed files with 8 additions and 2 deletions

View file

@ -11,6 +11,9 @@ KEY = config['application']['ApiKey']
# Bot's Misskey instance URL
INSTANCE = config['application']['InstanceUrl']
# SQLite Database location
DB_PATH = config['application']['DatabaseLocation']
# Extra stuff for control of the bot
# TODO: move this to db

View file

@ -1,8 +1,8 @@
import sqlite3
import random
import config
# TODO: grab this from a config file instead
DB_PATH = "./gacha_game.db" # Adjust if needed
DB_PATH = config.DB_PATH
def get_db_connection():
'''Creates a connection to the database'''

View file

@ -12,3 +12,6 @@ InstanceUrl = http://example.tld
; Comma separated list of fedi handles for any administrator users
DefaultAdmins = ['admin@example.tld']
; SQLite Database location
DatabaseLocation = ./gacha_game.db