diff --git a/cogs/commands/__init__.py b/cogs/commands/__init__.py index d71232f..013fef5 100644 --- a/cogs/commands/__init__.py +++ b/cogs/commands/__init__.py @@ -4,6 +4,7 @@ Cog loader. Adds all command cogs to the bot. from nextcord.ext import commands +from cogs.commands.record import RecordCog from cogs.commands.remove import RemoveCog from cogs.commands.request import RequestCog from cogs.commands.set import setCog @@ -18,6 +19,7 @@ def setup(bot: commands.Bot): Adds all command classes to bot. """ + bot.add_cog(RecordCog(bot)) bot.add_cog(RemoveCog()) bot.add_cog(RequestCog(bot)) bot.add_cog(TestCog(bot)) diff --git a/cogs/commands/record.py b/cogs/commands/record.py new file mode 100644 index 0000000..381a53b --- /dev/null +++ b/cogs/commands/record.py @@ -0,0 +1,39 @@ +""" +Contained commands and views for record commands. +""" + +import nextcord +from nextcord.ext import commands + + +class RecordCog(commands.Cog, name="Record Commands"): + """ + Class holds record commands. + """ + + def __init__(self, bot) -> None: + """ + Default constructor for RecordCog class. Does nothing. + """ + super().__init__() + self.bot: commands.Bot = bot + + @nextcord.slash_command() + async def record(self, interaction: nextcord.Interaction): + """ + Parent slash command for record. Never called. + """ + + @record.subcommand(description="Record an event and its participants.") + async def event( + self, + interaction: nextcord.Interaction, + host: nextcord.Member = nextcord.SlashOption( + required=False, + description="An alternative host if you are recording event for someone else.", + ), + ): + # check role + # create view to add members + # add points to table + pass diff --git a/config.py b/config.py index f071029..b779fbc 100644 --- a/config.py +++ b/config.py @@ -1,6 +1,7 @@ """ File contains classes defining the Hydra configuraton structure. """ + from dataclasses import dataclass @@ -17,6 +18,10 @@ class Params: clan_info_channel_id: int clan_member_role_id: int discord_token: str + event_host_points: int + event_host_role_id: int + event_participate_points: int + event_post_channel_id: int general_channel_id: int guild_id: int high_council_role_id: int