Template
Create template for discord bots
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""
|
||||
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) -> None:
|
||||
"""
|
||||
Default constructor for HelpCog class. Does nothing.
|
||||
"""
|
||||
self.bot = bot
|
||||
|
||||
@nextcord.slash_command()
|
||||
async def hi(self, interaction: nextcord.Interaction):
|
||||
"""
|
||||
Says hi
|
||||
|
||||
Args:
|
||||
interaction (nextcord.Interaction): Interaction to reply to.
|
||||
"""
|
||||
|
||||
await interaction.response.send_message("Hi!", ephemeral=True)
|
||||
Reference in New Issue
Block a user