Skip to content

Commit 3b4ca5c

Browse files
committed
Fixed Database Using Incorrect Schema
1 parent f1c6f3d commit 3b4ca5c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Teapot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
time_start = time.perf_counter()
6565
database = teapot.managers.database.__init__()
6666
db = teapot.managers.database.db(database)
67-
db.execute('ALTER DATABASE teapot CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci')
67+
db.execute('ALTER DATABASE `' + teapot.config.db_schema() + '` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci')
6868
db.execute(
6969
'CREATE TABLE IF NOT EXISTS `guilds` (`guild_id` BIGINT, `guild_name` TINYTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci')
7070
db.execute(

teapot/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ def bot_owner():
1010
def bot_token():
1111
return os.getenv('BOT_TOKEN')
1212

13+
def osu_api_key():
14+
return os.getenv('OSU_API_KEY')
15+
16+
def trn_api_key():
17+
return os.getenv('TRN_API_KEY')
18+
1319

1420
def bot_prefix():
1521
return eval(os.getenv('BOT_PREFIX', "['/teapot ', '/tp']"))

0 commit comments

Comments
 (0)