Update post highscores to new data class.
This commit is contained in:
@@ -27,7 +27,7 @@ class PostHighscores(commands.Cog, name="Post Highscores"):
|
||||
?post-scores
|
||||
```
|
||||
"""
|
||||
highscore_channel_id = highscores_data.get_guild_highscores_channel(ctx.guild.id)
|
||||
highscore_channel_id = highscores_data.get_guild(ctx.guild.id).highscore_channel
|
||||
print(f"Printing out highscores information in channel {highscore_channel_id}")
|
||||
channel = ctx.guild.get_channel(highscore_channel_id)
|
||||
|
||||
@@ -35,7 +35,7 @@ class PostHighscores(commands.Cog, name="Post Highscores"):
|
||||
error_response += 'Register with "?register" command.'
|
||||
assert channel is not None, await ctx.send(error_response)
|
||||
|
||||
for table in highscores_data.get_table_names(ctx.guild.id):
|
||||
for table in highscores_data.get_guild(ctx.guild.id).tables:
|
||||
message: nextcord.Message = await send_highscore_message(channel, table, ctx.guild.id)
|
||||
await message.edit(view=SubmissionCreateButton(self.bot))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user