Initial commit

This commit is contained in:
2025-03-17 12:46:29 -04:00
commit b482d87d0e
16 changed files with 537 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
"""Cog loader. Adds all command cogs to the bot."""
from nextcord.ext import commands
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) -> None:
"""Add all command classes to bot."""
bot.add_cog(HiCog(bot))
+22
View File
@@ -0,0 +1,22 @@
"""Example command file."""
import nextcord
from nextcord.ext import commands
class HiCog(commands.Cog, name="Test commands."):
"""Class holds commands for testing."""
def __init__(self, bot: nextcord.Bot) -> None:
self.bot = bot
@nextcord.slash_command()
async def hi(self, interaction: nextcord.Interaction) -> None:
"""
Says hi.
Args:
interaction (nextcord.Interaction): Interaction to reply to.
"""
await interaction.response.send_message("Hi!", ephemeral=True)