Fix issues found while live testing.
build_develop / build (push) Successful in 1m35s

This commit is contained in:
2024-05-22 21:15:37 -04:00
parent b9621a67c9
commit 9c175f3e52
4 changed files with 16 additions and 15 deletions
+8 -9
View File
@@ -4,7 +4,6 @@ from typing import TYPE_CHECKING
import nextcord
from nextcord.ext import application_checks, commands
from nextcord.ext.application_checks.core import AC
from classes.election_cycle import ElectionCycle
from utils import get_current_election_cycle
@@ -17,7 +16,7 @@ ME = 206602713511886849
GUILDS = [1000247361639030804]
def is_me() -> AC:
def is_me(): # noqa: ANN201
"""Predicate that makes sure only I can run the test commands."""
def predicate(interaction: nextcord.Interaction) -> bool:
@@ -53,7 +52,7 @@ class TestCog(commands.Cog, name="Test commands."):
self.bot.get_guild(config.params.guild_id),
)
await cycle.election_start_action()
await interaction.send("Test command sent.")
await interaction.send("Test command sent.", ephemeral=True)
@test.subcommand()
@is_me()
@@ -71,7 +70,7 @@ class TestCog(commands.Cog, name="Test commands."):
self.bot.get_guild(config.params.guild_id),
)
await cycle.voting_start_action()
await interaction.send("Test command sent.")
await interaction.send("Test command sent.", ephemeral=True)
@test.subcommand()
@is_me()
@@ -89,7 +88,7 @@ class TestCog(commands.Cog, name="Test commands."):
self.bot.get_guild(config.params.guild_id),
)
await cycle.voting_end_action()
await interaction.send("Test command sent.")
await interaction.send("Test command sent.", ephemeral=True)
@test.subcommand()
@is_me()
@@ -107,7 +106,7 @@ class TestCog(commands.Cog, name="Test commands."):
self.bot.get_guild(config.params.guild_id),
)
await cycle.highcouncil_election_start_action()
await interaction.send("Test command sent.")
await interaction.send("Test command sent.", ephemeral=True)
@test.subcommand()
@is_me()
@@ -125,7 +124,7 @@ class TestCog(commands.Cog, name="Test commands."):
self.bot.get_guild(config.params.guild_id),
)
await cycle.election_reminder()
await interaction.send("Test command sent.")
await interaction.send("Test command sent.", ephemeral=True)
@test.subcommand()
@is_me()
@@ -143,7 +142,7 @@ class TestCog(commands.Cog, name="Test commands."):
self.bot.get_guild(config.params.guild_id),
)
await cycle.check_date()
await interaction.send("Test command sent.")
await interaction.send("Test command sent.", ephemeral=True)
@test.subcommand()
@is_me()
@@ -161,4 +160,4 @@ class TestCog(commands.Cog, name="Test commands."):
self.bot.get_guild(config.params.guild_id),
)
await cycle.term_start_action()
await interaction.send("Test command sent.")
await interaction.send("Test command sent.", ephemeral=True)