Add HighscoresData to register command. Add channel setting functions.
This commit is contained in:
@@ -197,13 +197,40 @@ class HighscoresData:
|
||||
self._data[str(guild_id)] = guild_data
|
||||
save_highscores_data(self._data)
|
||||
|
||||
def set_guild_highscore_channel(self, guild_id: int, channel_id: int) -> None:
|
||||
"""
|
||||
Sets the guild's highscores channel.
|
||||
|
||||
@param guild_id: guild id to set to.
|
||||
@param channel_id: channel id to set.
|
||||
"""
|
||||
self._data[str(guild_id)]["highscore_channel_id"] = channel_id
|
||||
|
||||
def set_guild_submission_channel(self, guild_id: int, channel_id: int) -> None:
|
||||
"""
|
||||
Sets the guild's submission channel.
|
||||
|
||||
@param guild_id: guild id to set to.
|
||||
@param channel_id: channel id to set.
|
||||
"""
|
||||
self._data[str(guild_id)]["submission_channel_id"] = channel_id
|
||||
|
||||
def set_guild_verification_channel(self, guild_id: int, channel_id: int) -> None:
|
||||
"""
|
||||
Sets the guild's verification channel.
|
||||
|
||||
@param guild_id: guild id to set to.
|
||||
@param channel_id: channel id to set.
|
||||
"""
|
||||
self._data[str(guild_id)]["verification_channel_id"] = channel_id
|
||||
|
||||
def set_table_message_id(self, guild_id: int, table: str, message_id: int) -> None:
|
||||
"""
|
||||
Sets the message id for given guild's table.
|
||||
Saves highscores data.
|
||||
|
||||
@param guild_id: guild id to retrieve from.
|
||||
@param table: the table to retreive from.
|
||||
@param guild_id: guild id to set to.
|
||||
@param table: the table to set to.
|
||||
@param message_id: message id to set.
|
||||
"""
|
||||
self._data[str(guild_id)]["tables"][table]["message_id"] = message_id
|
||||
|
||||
Reference in New Issue
Block a user