ajout de commentaires
This commit is contained in:
@@ -122,17 +122,27 @@ class ConfigManager:
|
||||
{key: self.get(key) for key in CONFIG_SCHEMA},
|
||||
)
|
||||
|
||||
# --------------- SETTERS MÉTIER -------------------------------
|
||||
# ---------------------------------------------------------------------------
|
||||
# SETTERS MÉTIER
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Set Discord ID
|
||||
def set_discord_user(self, user_id: str) -> None:
|
||||
self.set(DISCORD_USER_KEY, user_id)
|
||||
|
||||
# Set volume
|
||||
def set_volume(self, volume: int) -> None:
|
||||
self.set(VOLUME_KEY, volume)
|
||||
|
||||
# --------------- GETTERS MÉTIER -------------------------------
|
||||
# ---------------------------------------------------------------------------
|
||||
# GETTERS MÉTIER
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Get discord ID
|
||||
def get_default(self, key: str):
|
||||
return CONFIG_SCHEMA[key]["default"]
|
||||
|
||||
# Get volume value
|
||||
def get_discord_user(self) -> str:
|
||||
return cast(str, self.get(DISCORD_USER_KEY))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user