Changed config table name.

This commit is contained in:
alwayscompiling
2022-07-22 23:02:24 -04:00
parent 6d0c10e1cc
commit d067da2300
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ class PostHighscores(commands.Cog, name="Post Highscores"):
assert channel is not None, await ctx.send(error_response) assert channel is not None, await ctx.send(error_response)
for boss, categories in highscores_config[ # pylint: disable=unused-variable for boss, categories in highscores_config[ # pylint: disable=unused-variable
"highscore_table" "tables"
].items(): ].items():
message: nextcord.Message = await send_highscore_message(channel, boss) message: nextcord.Message = await send_highscore_message(channel, boss)
await message.edit(view=SubmissionCreateButton(self.bot)) await message.edit(view=SubmissionCreateButton(self.bot))
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"highscore_table": { "tables": {
"The Ambassador": [ "The Ambassador": [
"Kill Count", "Kill Count",
"Kill Time", "Kill Time",
+1 -1
View File
@@ -16,7 +16,7 @@ def create_highscore_skeleton() -> dict:
# create the dict # create the dict
skeleton = {"highscore_channel_id": -1, "verification_channel_id": -1, "username_length": 12} skeleton = {"highscore_channel_id": -1, "verification_channel_id": -1, "username_length": 12}
config: dict = open_highscores_config() config: dict = open_highscores_config()
for boss, categories in config["highscore_table"].items(): for boss, categories in config["tables"].items():
skeleton["tables"][boss] = {"message_id": 0} skeleton["tables"][boss] = {"message_id": 0}
boss_categories = {} boss_categories = {}
for category in categories: for category in categories: