Runtime error fixes.

This commit is contained in:
alwayscompiling
2022-08-03 20:03:48 -04:00
parent 5b3c9ef247
commit b65254c2cc
3 changed files with 10 additions and 7 deletions
+4 -4
View File
@@ -27,16 +27,16 @@ class PostHighscores(commands.Cog, name="Post Highscores"):
?post-scores
```
"""
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)
guild = highscores_data.get_guild(ctx.guild.id)
print(f"Printing out highscores information in channel {guild.highscore_channel}")
channel = ctx.guild.get_channel(guild.highscore_channel)
error_response = "Registered Highscores channel does not exist or was never registered. "
error_response += 'Register with "?register" command.'
assert channel is not None, await ctx.send(error_response)
for table in highscores_data.get_guild(ctx.guild.id).tables:
message: nextcord.Message = await send_highscore_message(channel, table, ctx.guild.id)
message: nextcord.Message = await send_highscore_message(channel, guild, table)
await message.edit(view=SubmissionCreateButton(self.bot))