Compare commits

...
2 Commits
Author SHA1 Message Date
alwayscompiling 5155744ec5 Made config file more efficient. 2022-07-13 22:02:40 -04:00
alwayscompiling fedc8be778 Adding VerificationView to bot on cog load. 2022-07-13 20:01:21 -04:00
4 changed files with 316 additions and 831 deletions
+2
View File
@@ -5,6 +5,7 @@ Cog for creating submission process.
from nextcord.ext import commands
from .submission_views import SubmissionButton
from .verification_view import VerificationView
class SubmissionCog(commands.Cog, name="Submission Cog"):
@@ -17,6 +18,7 @@ class SubmissionCog(commands.Cog, name="Submission Cog"):
async def on_ready(self):
"""Called when cog is loaded"""
self.bot.add_view(SubmissionButton(self.bot))
self.bot.add_view(VerificationView())
# This function will be called when this extension is loaded.
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -33,7 +33,7 @@ def open_highscores_data():
for boss, categories in config["highscore_table"].items():
data[boss] = {"message_id": 0}
boss_categories = {}
for category, category_config in categories.items(): # pylint: disable=unused-variable
for category in categories: # pylint: disable=unused-variable
rank_list = []
boss_categories[category] = rank_list
data[boss]["categories"] = boss_categories
+1 -1
View File
@@ -75,7 +75,7 @@ async def submit_score(
@param score: score to add
"""
boss_category_config = highscores_config["highscore_table"][boss_name][category]
boss_category_config = highscores_config["categories"][category]
# capping to 12 characters because runescape names are 12 characters long.
# Splitting on pipe. My discord has multiple names on account split by pipe.