Create record command class. Update configs for recording events.
This commit is contained in:
@@ -4,6 +4,7 @@ Cog loader. Adds all command cogs to the bot.
|
|||||||
|
|
||||||
from nextcord.ext import commands
|
from nextcord.ext import commands
|
||||||
|
|
||||||
|
from cogs.commands.record import RecordCog
|
||||||
from cogs.commands.remove import RemoveCog
|
from cogs.commands.remove import RemoveCog
|
||||||
from cogs.commands.request import RequestCog
|
from cogs.commands.request import RequestCog
|
||||||
from cogs.commands.set import setCog
|
from cogs.commands.set import setCog
|
||||||
@@ -18,6 +19,7 @@ def setup(bot: commands.Bot):
|
|||||||
Adds all command classes to bot.
|
Adds all command classes to bot.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
bot.add_cog(RecordCog(bot))
|
||||||
bot.add_cog(RemoveCog())
|
bot.add_cog(RemoveCog())
|
||||||
bot.add_cog(RequestCog(bot))
|
bot.add_cog(RequestCog(bot))
|
||||||
bot.add_cog(TestCog(bot))
|
bot.add_cog(TestCog(bot))
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
"""
|
"""
|
||||||
File contains classes defining the Hydra configuraton structure.
|
File contains classes defining the Hydra configuraton structure.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
@@ -17,6 +18,10 @@ class Params:
|
|||||||
clan_info_channel_id: int
|
clan_info_channel_id: int
|
||||||
clan_member_role_id: int
|
clan_member_role_id: int
|
||||||
discord_token: str
|
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
|
general_channel_id: int
|
||||||
guild_id: int
|
guild_id: int
|
||||||
high_council_role_id: int
|
high_council_role_id: int
|
||||||
|
|||||||
Reference in New Issue
Block a user