From b16132d61b010404811f53803e1400f08afad00e Mon Sep 17 00:00:00 2001 From: imcompiling Date: Thu, 20 Feb 2025 11:27:20 -0500 Subject: [PATCH] Add submission command to init cog. Clean up init cog. --- cogs/commands/__init__.py | 12 +++++------- cogs/commands/submission.py | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/cogs/commands/__init__.py b/cogs/commands/__init__.py index 21a0f0c..38bffbc 100644 --- a/cogs/commands/__init__.py +++ b/cogs/commands/__init__.py @@ -1,6 +1,4 @@ -""" -Cog loader. Adds all command cogs to the bot. -""" +"""Cog loader. Adds all command cogs to the bot.""" from nextcord.ext import commands @@ -9,20 +7,20 @@ from .delete import DeleteCog from .help import HelpCog from .refresh import RefreshCog from .set import SetCog +from .submission import SubmissionCog from .update import UpdateCog from .view import ViewCog # This function will be called when this extension is loaded. # It is necessary to add these functions to the bot. -def setup(bot: commands.Bot): - """ - Adds all command classes to bot. - """ +def setup(bot: commands.Bot) -> None: + """Adds all command classes to bot.""" bot.add_cog(CreateCog(bot)) bot.add_cog(DeleteCog()) bot.add_cog(HelpCog()) bot.add_cog(RefreshCog(bot)) bot.add_cog(SetCog()) + bot.add_cog(SubmissionCog()) bot.add_cog(UpdateCog(bot)) bot.add_cog(ViewCog()) diff --git a/cogs/commands/submission.py b/cogs/commands/submission.py index 626c391..bf53d02 100644 --- a/cogs/commands/submission.py +++ b/cogs/commands/submission.py @@ -23,9 +23,9 @@ class SubmissionCog(commands.Cog): async def submit( self, interaction: nextcord.Interaction, - group_id: str = nextcord.SlashOption(name="Group", required=True, description="Group to submit score to."), + group_id: str = nextcord.SlashOption(name="group", required=True, description="Group to submit score to."), category_id: str = nextcord.SlashOption( - name="Category", required=True, description="Category to submit score to." + name="category", required=True, description="Category to submit score to." ), score: str = nextcord.SlashOption(required=True, description="Score to submit"), username: str = nextcord.SlashOption(