Fix types in database, add UserId, fix file usage in submission command.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
);
|
||||
Reference in New Issue
Block a user