Create record command class. Update configs for recording events.

This commit is contained in:
2024-05-08 16:40:16 -04:00
parent 3b6bef3ff0
commit a2afdc0295
3 changed files with 46 additions and 0 deletions
+2
View File
@@ -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))
+39
View File
@@ -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
+5
View File
@@ -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