modified: bot.py

This commit is contained in:
SimolZimol
2026-01-09 21:39:50 +01:00
parent d67453654a
commit 2ee44c21dd

10
bot.py
View File

@@ -33,7 +33,9 @@ def get_db_connection():
port=MYSQL_PORT,
user=MYSQL_USER,
password=MYSQL_PASSWORD,
database=MYSQL_DATABASE
database=MYSQL_DATABASE,
charset='utf8mb4',
collation='utf8mb4_unicode_ci'
)
def init_db():
@@ -46,19 +48,19 @@ def init_db():
channel_id BIGINT,
title VARCHAR(255),
project VARCHAR(255),
status VARCHAR(32),
status VARCHAR(100),
creator BIGINT,
created_at VARCHAR(32),
reference_message_id VARCHAR(32),
archived BOOLEAN DEFAULT FALSE
)
) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
''')
cursor.execute('''
CREATE TABLE IF NOT EXISTS server_settings (
guild_id BIGINT PRIMARY KEY,
active_channel_id BIGINT,
archive_channel_id BIGINT
)
) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
''')
conn.commit()
cursor.close()