Compare commits
4
Commits
79706fbe34
..
v1.7.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70676a98dd | ||
|
|
512802def7 | ||
|
|
87b21782ce | ||
|
|
38ef2f4cb8 |
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user