From 349fdfe18d6e794729b85163565a55285c6f39e8 Mon Sep 17 00:00:00 2001 From: alwayscompiling Date: Thu, 11 Aug 2022 22:16:57 -0400 Subject: [PATCH] Renamed python files to more describe their contents. Intend on having more than 1 class per file. --- cogs/commands/__init__.py | 6 +++--- .../commands/{post_highscores.py => message_management.py} | 7 +++++-- cogs/commands/{register.py => settings_management.py} | 5 ++--- cogs/commands/{delete_scores.py => table_management.py} | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) rename cogs/commands/{post_highscores.py => message_management.py} (92%) rename cogs/commands/{register.py => settings_management.py} (97%) rename cogs/commands/{delete_scores.py => table_management.py} (96%) diff --git a/cogs/commands/__init__.py b/cogs/commands/__init__.py index e8e2eb0..897e62b 100644 --- a/cogs/commands/__init__.py +++ b/cogs/commands/__init__.py @@ -5,9 +5,9 @@ Cog loader. Adds all command classes as cogs to the bot. from nextcord.ext import commands # Command classes -from .delete_scores import DeleteScores -from .post_highscores import PostHighscores -from .register import Register +from .message_management import PostHighscores +from .settings_management import Register +from .table_management import DeleteScores # This function will be called when this extension is loaded. # It is necessary to add these functions to the bot. diff --git a/cogs/commands/post_highscores.py b/cogs/commands/message_management.py similarity index 92% rename from cogs/commands/post_highscores.py rename to cogs/commands/message_management.py index 6fa8dba..34cf001 100644 --- a/cogs/commands/post_highscores.py +++ b/cogs/commands/message_management.py @@ -1,5 +1,5 @@ """ -Bot command to post the highscores +Commands for managing/displaying the highscores messages. """ from nextcord.ext import commands @@ -11,7 +11,10 @@ from utilities.utils import send_highscore_message # pylint: disable=import-err class PostHighscores(commands.Cog, name="Post Highscores"): - """Posts Highscores.""" + """ + Posts Highscores messages. Either creates new messages for each table if one doesn't exist + or edits the existing message. + """ def __init__(self, bot: commands.Bot) -> None: """ diff --git a/cogs/commands/register.py b/cogs/commands/settings_management.py similarity index 97% rename from cogs/commands/register.py rename to cogs/commands/settings_management.py index 88bcfad..b649b28 100644 --- a/cogs/commands/register.py +++ b/cogs/commands/settings_management.py @@ -1,8 +1,7 @@ """ -Bot command for registering various channels to the bot. +Commands for managing the Guild's settings. """ - from nextcord.ext import commands import nextcord @@ -11,7 +10,7 @@ from highscores import highscores_data # pylint: disable=import-error class Register(commands.Cog, name="Register"): """ - Class holds various register commands. + Class holds the Register group command. Registers various channels. """ def __init__(self) -> None: diff --git a/cogs/commands/delete_scores.py b/cogs/commands/table_management.py similarity index 96% rename from cogs/commands/delete_scores.py rename to cogs/commands/table_management.py index 1c10dd0..c6f49bc 100644 --- a/cogs/commands/delete_scores.py +++ b/cogs/commands/table_management.py @@ -1,5 +1,5 @@ """ -Bot command for deleting the guild's scores. +Commands for managing the tables/categories/scores for a Guild. """ from nextcord.ext import commands