Rework point settings to combine clan and event points into same class for simplicity.
This commit is contained in:
+14
-20
@@ -19,15 +19,6 @@ class ChannelIds:
|
||||
voting: int
|
||||
|
||||
|
||||
@dataclass
|
||||
class ClanPointSettings:
|
||||
"""Class defines settings for Clan Points editable by Clan Council."""
|
||||
|
||||
points: int
|
||||
verify: bool
|
||||
weekly_limit: int
|
||||
|
||||
|
||||
@dataclass
|
||||
class Election:
|
||||
"""Class defines relevant election dates."""
|
||||
@@ -44,16 +35,6 @@ class Election:
|
||||
voting_start: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class EventSettings:
|
||||
"""Class defines settings editable by Clan Council."""
|
||||
|
||||
host_points: int
|
||||
participate_points: int
|
||||
verify: bool
|
||||
weekly_limit: int
|
||||
|
||||
|
||||
@dataclass
|
||||
class Params:
|
||||
"""Class defines start parameters that shouldn't be changed."""
|
||||
@@ -63,6 +44,19 @@ class Params:
|
||||
guild_id: int
|
||||
|
||||
|
||||
@dataclass
|
||||
class PointSettings:
|
||||
"""Class defines point settings editable by Clan Council."""
|
||||
|
||||
clan_points: int
|
||||
clan_points_weekly_limit: int
|
||||
events_weekly_limit: int
|
||||
host_points: int
|
||||
participate_points: int
|
||||
verify_clan_points: bool
|
||||
verify_events: bool
|
||||
|
||||
|
||||
@dataclass
|
||||
class RoleIds:
|
||||
"""Class holds all role ids needed by bot."""
|
||||
@@ -80,8 +74,8 @@ class DakinySettings(YAMLWizard):
|
||||
|
||||
channel_ids: ChannelIds
|
||||
election_cycles: list[Election]
|
||||
event_settings: EventSettings
|
||||
params: Params
|
||||
point_settings: PointSettings
|
||||
role_ids: RoleIds
|
||||
|
||||
def save(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user