diff --git a/cogs/commands/__init__.py b/cogs/commands/__init__.py index 7a7cad0..b6739b9 100644 --- a/cogs/commands/__init__.py +++ b/cogs/commands/__init__.py @@ -1,6 +1,4 @@ -""" -Cog loader. Adds all command cogs to the bot. -""" +"""Cog loader. Adds all command cogs to the bot.""" from nextcord.ext import commands @@ -9,8 +7,6 @@ from cogs.commands.hi import HiCog # This function will be called when this extension is loaded. # It is necessary to add these functions to the bot. -def setup(bot: commands.Bot): - """ - Adds all command classes to bot. - """ +def setup(bot: commands.Bot) -> None: + """Add all command classes to bot.""" bot.add_cog(HiCog(bot)) diff --git a/cogs/commands/hi.py b/cogs/commands/hi.py index 4a193a7..0a7a512 100644 --- a/cogs/commands/hi.py +++ b/cogs/commands/hi.py @@ -1,29 +1,22 @@ -""" -Example command file. -""" +"""Example command file.""" import nextcord from nextcord.ext import commands class HiCog(commands.Cog, name="Test commands."): - """ - Class holds commands for testing. - """ + """Class holds commands for testing.""" - def __init__(self, bot) -> None: - """ - Default constructor for HelpCog class. Does nothing. - """ + def __init__(self, bot: nextcord.Bot) -> None: self.bot = bot @nextcord.slash_command() - async def hi(self, interaction: nextcord.Interaction): + async def hi(self, interaction: nextcord.Interaction) -> None: """ - Says hi + Says hi. Args: interaction (nextcord.Interaction): Interaction to reply to. - """ + """ await interaction.response.send_message("Hi!", ephemeral=True)