Update message listener to new data classes.
This commit is contained in:
@@ -39,7 +39,7 @@ class SubmissionListener(commands.Cog, name="Message Listener"):
|
||||
|
||||
if message.author.id in submission_objects:
|
||||
message_id = submission_objects[message.author.id]["message_id"]
|
||||
submission_channel_id = highscores_data.get_guild_submission_channel(guild_id)
|
||||
submission_channel_id = highscores_data.get_guild(guild_id).submission_channel
|
||||
submission_message: nextcord.Message = (
|
||||
await self.bot.get_guild(guild_id)
|
||||
.get_channel(submission_channel_id)
|
||||
@@ -52,8 +52,11 @@ class SubmissionListener(commands.Cog, name="Message Listener"):
|
||||
if state == SubmissionState.SCORE and message.content:
|
||||
|
||||
# check with regex if score matches correctly
|
||||
is_time_record = highscores_data.get_config_time_record(
|
||||
submission_objects[message.author.id]["category"]
|
||||
is_time_record = (
|
||||
highscores_data.get_guild(guild_id)
|
||||
.get_table(submission_objects[message.author.id]["boss_name"])
|
||||
.get_category(submission_objects[message.author.id]["category"])
|
||||
.time_record
|
||||
)
|
||||
|
||||
time_regex = re.search(
|
||||
@@ -97,7 +100,7 @@ class SubmissionListener(commands.Cog, name="Message Listener"):
|
||||
)
|
||||
elif state == SubmissionState.NAME and message.content:
|
||||
submission_objects[message.author.id]["username"] = message.content[
|
||||
: highscores_data.get_guild_username_length(guild_id)
|
||||
: highscores_data.get_guild(guild_id).username_length
|
||||
]
|
||||
embed = get_submission_embed(message.author.id)
|
||||
await submission_message.edit(
|
||||
|
||||
Reference in New Issue
Block a user