hello.py 414 B

12345678910111213141516
  1. import discord
  2. from discord.ext import commands
  3. from discord.commands import slash_command
  4. class Hello(commands.Cog):
  5. def __init__(self, bot: discord.Bot):
  6. self.bot = bot
  7. @slash_command(name="hallo", description="hello")
  8. async def hello(self, ctx: discord.ApplicationContext):
  9. await ctx.respond(f"Hey {ctx.author.mention}")
  10. def setup(bot: discord.Bot):
  11. bot.add_cog(Hello(bot))