Create teh get cog, add it to init for commands.

This commit is contained in:
2025-03-07 15:59:13 -05:00
parent 81ae867a43
commit 50868988c0
2 changed files with 25 additions and 8 deletions
+10 -8
View File
@@ -2,14 +2,15 @@
from nextcord.ext import commands from nextcord.ext import commands
from .create import CreateCog from cogs.commands.create import CreateCog
from .delete import DeleteCog from cogs.commands.delete import DeleteCog
from .help import HelpCog from cogs.commands.get import GetCog
from .refresh import RefreshCog from cogs.commands.help import HelpCog
from .set import SetCog from cogs.commands.refresh import RefreshCog
from .submission import SubmissionCog from cogs.commands.set import SetCog
from .update import UpdateCog from cogs.commands.submission import SubmissionCog
from .view import ViewCog from cogs.commands.update import UpdateCog
from cogs.commands.view import ViewCog
# This function will be called when this extension is loaded. # This function will be called when this extension is loaded.
@@ -18,6 +19,7 @@ def setup(bot: commands.Bot) -> None:
"""Adds all command classes to bot.""" """Adds all command classes to bot."""
bot.add_cog(CreateCog(bot)) bot.add_cog(CreateCog(bot))
bot.add_cog(DeleteCog()) bot.add_cog(DeleteCog())
bot.add_cog(GetCog())
bot.add_cog(HelpCog()) bot.add_cog(HelpCog())
bot.add_cog(RefreshCog(bot)) bot.add_cog(RefreshCog(bot))
bot.add_cog(SetCog()) bot.add_cog(SetCog())
+15
View File
@@ -0,0 +1,15 @@
"""Get command hierarchy."""
import nextcord
from nextcord.ext import commands
class GetCog(commands.Cog, name="Get command."):
"""Class holds commands for setting variables in guild's database."""
def __init__(self) -> None:
"""Default constructor for SetCog class. Does nothing."""
@nextcord.slash_command(default_member_permissions=nextcord.Permissions(administrator=True))
async def get(self, interaction: nextcord.Interaction) -> None:
"""Parent slash command for setting settings. Never called."""