Renamed to DakinySettings. Converted dataclass to YAMLWizard.
build_develop / build (push) Failing after 17s
build_develop / build (push) Failing after 17s
This commit is contained in:
@@ -4,7 +4,7 @@ import nextcord
|
||||
from discord import TextInputStyle
|
||||
from nextcord.ext import commands
|
||||
|
||||
from DakinyConfig import DakinyConfig
|
||||
from DakinySettings import DakinySettings
|
||||
from utils import GUILDS, MAX_DISCORD_MESSAGE_LENGTH, record_event_points
|
||||
|
||||
|
||||
@@ -155,11 +155,11 @@ class EventView(nextcord.ui.View):
|
||||
Also contains a UserSelect object to pick discord members.
|
||||
"""
|
||||
|
||||
def __init__(self, name: str, config: DakinyConfig, host_id: int):
|
||||
def __init__(self, name: str, config: DakinySettings, host_id: int):
|
||||
super().__init__()
|
||||
|
||||
self.name: str = name
|
||||
self.config: DakinyConfig = config
|
||||
self.config: DakinySettings = config
|
||||
self.host_id: int = host_id
|
||||
|
||||
self.event_participants = ParticipantSelect()
|
||||
|
||||
@@ -9,7 +9,7 @@ from sqlalchemy.orm import Session
|
||||
from database_setup.sql_data_classes import Presences, engine
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from DakinyConfig import DakinyConfig
|
||||
from DakinySettings import DakinySettings
|
||||
|
||||
|
||||
class RequestCog(commands.Cog, name="Request Commands"):
|
||||
@@ -41,7 +41,7 @@ class RequestCog(commands.Cog, name="Request Commands"):
|
||||
interaction (nextcord.Interaction): Interaction that invoked the command.
|
||||
presence (str): The presence to add.
|
||||
"""
|
||||
config: DakinyConfig = self.bot.config
|
||||
config: DakinySettings = self.bot.config
|
||||
content = f'<@{interaction.user.id}> would like to add presence "{presence}."'
|
||||
view = PresenceChange(presence)
|
||||
await self.bot.get_channel(config.params.admin_channel_id).send(content=content, view=view)
|
||||
@@ -65,7 +65,7 @@ class RequestCog(commands.Cog, name="Request Commands"):
|
||||
interaction (nextcord.Interaction): Interaction that invoked the command.
|
||||
new_nickname(str): The username to change to.
|
||||
"""
|
||||
config: DakinyConfig = self.bot.config
|
||||
config: DakinySettings = self.bot.config
|
||||
content = f'<@{interaction.user.id}> would like to change their username to "{new_nickname}."'
|
||||
view = UsernameRequest(interaction.user.id, new_nickname)
|
||||
await self.bot.get_channel(config.params.admin_channel_id).send(content=content, view=view)
|
||||
|
||||
@@ -9,7 +9,7 @@ from classes.election import Election
|
||||
from utils import GUILDS, get_current_election_cycle
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from DakinyConfig import DakinyConfig
|
||||
from DakinySettings import DakinySettings
|
||||
|
||||
|
||||
ME = 206602713511886849
|
||||
@@ -44,7 +44,7 @@ class TestCog(commands.Cog, name="Test commands."):
|
||||
Args:
|
||||
interaction (nextcord.Interaction): Interaction with the message.
|
||||
"""
|
||||
config: DakinyConfig = self.bot.config
|
||||
config: DakinySettings = self.bot.config
|
||||
cycle = Election(
|
||||
get_current_election_cycle(config),
|
||||
config,
|
||||
@@ -62,7 +62,7 @@ class TestCog(commands.Cog, name="Test commands."):
|
||||
Args:
|
||||
interaction (nextcord.Interaction): Interaction with the message.
|
||||
"""
|
||||
config: DakinyConfig = self.bot.config
|
||||
config: DakinySettings = self.bot.config
|
||||
cycle = Election(
|
||||
get_current_election_cycle(config),
|
||||
config,
|
||||
@@ -80,7 +80,7 @@ class TestCog(commands.Cog, name="Test commands."):
|
||||
Args:
|
||||
interaction (nextcord.Interaction): Interaction with the message.
|
||||
"""
|
||||
config: DakinyConfig = self.bot.config
|
||||
config: DakinySettings = self.bot.config
|
||||
cycle = Election(
|
||||
get_current_election_cycle(config),
|
||||
config,
|
||||
@@ -98,7 +98,7 @@ class TestCog(commands.Cog, name="Test commands."):
|
||||
Args:
|
||||
interaction (nextcord.Interaction): Interaction with the message.
|
||||
"""
|
||||
config: DakinyConfig = self.bot.config
|
||||
config: DakinySettings = self.bot.config
|
||||
cycle = Election(
|
||||
get_current_election_cycle(config),
|
||||
config,
|
||||
@@ -116,7 +116,7 @@ class TestCog(commands.Cog, name="Test commands."):
|
||||
Args:
|
||||
interaction (nextcord.Interaction): Interaction with the message.
|
||||
"""
|
||||
config: DakinyConfig = self.bot.config
|
||||
config: DakinySettings = self.bot.config
|
||||
cycle = Election(
|
||||
get_current_election_cycle(config),
|
||||
config,
|
||||
@@ -134,7 +134,7 @@ class TestCog(commands.Cog, name="Test commands."):
|
||||
Args:
|
||||
interaction (nextcord.Interaction): Interaction with the message.
|
||||
"""
|
||||
config: DakinyConfig = self.bot.config
|
||||
config: DakinySettings = self.bot.config
|
||||
cycle = Election(
|
||||
get_current_election_cycle(config),
|
||||
config,
|
||||
@@ -152,7 +152,7 @@ class TestCog(commands.Cog, name="Test commands."):
|
||||
Args:
|
||||
interaction (nextcord.Interaction): Interaction with the message.
|
||||
"""
|
||||
config: DakinyConfig = self.bot.config
|
||||
config: DakinySettings = self.bot.config
|
||||
cycle = Election(
|
||||
get_current_election_cycle(config),
|
||||
config,
|
||||
|
||||
Reference in New Issue
Block a user