Changed design to be one class per file.

This commit is contained in:
alwayscompiling
2022-08-11 22:44:22 -04:00
parent 349fdfe18d
commit b2acafd6e7
4 changed files with 23 additions and 17 deletions
+9 -4
View File
@@ -10,15 +10,14 @@ from highscores import highscores_data # pylint: disable=import-error
from utilities.utils import send_highscore_message # pylint: disable=import-error
class PostHighscores(commands.Cog, name="Post Highscores"):
class MessageManagement(commands.Cog, name="Message Management"):
"""
Posts Highscores messages. Either creates new messages for each table if one doesn't exist
or edits the existing message.
Class holds commands for managing the messages that display highscores.
"""
def __init__(self, bot: commands.Bot) -> None:
"""
Default constructor for PostHighscores class
Default constructor for MessageManagement class
Args:
bot (commands.Bot): Bot object. Required to register submission button view.
@@ -33,6 +32,12 @@ class PostHighscores(commands.Cog, name="Post Highscores"):
"""
A command which posts the highscore in the registered channel.
Sends warning if no channel has been registered.
Either creates new messages for each table if one doesn't exist
or edits the existing message.
Args:
interaction (nextcord.Interaction): Interaction that invoked the command
"""
guild = highscores_data.get_guild(interaction.guild_id)
print(f"Printing out highscores information in channel {guild.highscore_channel}")