Fix types in database, add UserId, fix file usage in submission command.

This commit is contained in:
2025-02-20 11:46:22 -05:00
parent b16132d61b
commit 3898e5e494
2 changed files with 5 additions and 2 deletions
+2
View File
@@ -33,6 +33,8 @@ class VerificationView(nextcord.ui.View):
elif field["name"] == "User Name":
user = field["value"]
# TODO: rework to get the information from database instead
try:
await submit_score(interaction, group_id, category_id, user, score)
content = interaction.message.content
+3 -2
View File
@@ -47,9 +47,10 @@ CREATE TABLE Scores(
CREATE TABLE Submissions(
CategoryId int unsigned not null,
GroupId int unsigned not null,
GuildId int unsigned not null,
MessageId int unsigned not null,
GuildId bigint unsigned not null,
MessageId bigint unsigned not null,
Score varchar(30) not null, -- Score is stored as a string until converted during submission
UserId bigint unsigned not null,
UserName varchar(30) not null,
PRIMARY KEY (CategoryId, UserName) -- one submission a category per user.
);