move test example extensions to have proper

filenames
This commit is contained in:
Uwe Pfeifer 2025-05-16 19:47:10 +02:00
parent 4a5f85860e
commit a3d280d24f
2 changed files with 0 additions and 0 deletions

21
ext/cmds.py.example Normal file
View file

@ -0,0 +1,21 @@
# pybot-f 2nd test extension ... other type of commands (this time, nogroup commands)
# this code has been copied from the docs/github
#
#
import discord
from discord import app_commands
from discord.ext import commands
class Test2Cog(commands.Cog):
def __init__(self, bot: commands.Bot) -> None:
self.bot = bot
@app_commands.command(name="testcmd-1")
async def my_command(self, interaction: discord.Interaction) -> None:
""" /command-1 """
await interaction.response.send_message("Hello from command 1!", ephemeral=True)
async def setup(bot: commands.Bot) -> None:
await bot.add_cog(Test2Cog(bot))