Compare commits

...
Author SHA1 Message Date
imcompiling 512802def7 Add ability to configure event verification.
build_develop / build (push) Successful in 1m22s
2024-09-07 15:14:50 -04:00
imcompiling 87b21782ce Remove unneeded import. 2024-09-07 15:08:53 -04:00
imcompiling 38ef2f4cb8 process_event isn't part of the class anymore. 2024-09-07 15:07:59 -04:00
2 changed files with 24 additions and 6 deletions
+1 -3
View File
@@ -1,7 +1,5 @@
"""Contained commands and views for record commands."""
from typing import List
import nextcord
from discord import TextInputStyle
from nextcord.ext import commands
@@ -192,7 +190,7 @@ class EventView(nextcord.ui.View):
)
submission_response = "Event has been submitted to admins for approval."
else:
self.process_event(
process_event(
self.event_participants.values.members,
interaction.message.embeds[0].fields[1].value,
self.host_id,
+23 -3
View File
@@ -160,7 +160,7 @@ class SettingsCog(commands.Cog, name="Settings Commands"):
Args:
interaction (nextcord.Interaction): Discord interaction of command.
points (nextcord.TextChannel): Number of points to set.
points (int): Number of points to set.
"""
settings.event_settings.host_points = points
settings.save()
@@ -181,12 +181,32 @@ class SettingsCog(commands.Cog, name="Settings Commands"):
Args:
interaction (nextcord.Interaction): Discord interaction of command.
points (nextcord.TextChannel): Number of points to set.
points (int): Number of points to set.
"""
settings.event_settings.participate_points = points
settings.save()
await interaction.response.send_message(f"Event Participation Points set to {points}.", ephemeral=True)
@event_settings.subcommand(description="Sets Event Participation Points value.")
async def verify(
self,
interaction: nextcord.Interaction,
do_verification: bool = nextcord.SlashOption( # noqa: FBT001
required=True,
description="Whether an event should be verified or not.",
),
) -> None:
"""
Sets DakinySettings event_settings.verify to the given number of points.
Args:
interaction (nextcord.Interaction): Discord interaction of command.
do_verification (bool): If the bot should verify events.
"""
settings.event_settings.verify = do_verification
settings.save()
await interaction.response.send_message(f"Event verification set to {do_verification}.", ephemeral=True)
@event_settings.subcommand(description="Sets Event Weekly Limit value.")
async def weekly_limit(
self,
@@ -200,7 +220,7 @@ class SettingsCog(commands.Cog, name="Settings Commands"):
Args:
interaction (nextcord.Interaction): Discord interaction of command.
points (nextcord.TextChannel): Number of points to set.
points (int): Number of points to set.
"""
settings.event_settings.weekly_limit = points
settings.save()