Adding verification channel register command.

This commit is contained in:
alwayscompiling
2022-07-03 11:20:08 -04:00
parent cfde28ad4b
commit 04faff3bdb
5 changed files with 45 additions and 10 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ def open_highscores_data():
data = json.load(file)
else:
# create the json object
data = {"channel_id": -1}
data = {"highscore_channel_id": -1, "verification_channel_id": -1}
config = open_highscores_config()
for boss in config["bosses"]:
data[boss["boss"]] = {"message_id": 0}
+3 -3
View File
@@ -46,9 +46,9 @@ async def submit_score(self, ctx: commands.Context, boss_name: str, category: st
highscores_data[boss_name]["categories"][category] = scores
# edit message
channel_id = highscores_data["channel_id"]
print(f"Editting message {channel_id}")
channel = self.bot.get_channel(channel_id)
highscore_channel_id = highscores_data["highscore_channel_id"]
print(f"Editting message {highscore_channel_id}")
channel = self.bot.get_channel(highscore_channel_id)
if channel is None:
response = 'Registered Highscores channel does not exist or was never registered. \
Register with "?register" command.'