say.py 466 B

1234567891011121314151617
  1. import discord
  2. from discord.ext import commands
  3. from discord.commands import Option
  4. from discord.commands import slash_command
  5. class Say(commands.Cog):
  6. def __init__(self, bot: discord.Bot):
  7. self.bot = bot
  8. @slash_command(description="Greet a User")
  9. async def greet(ctx, user: str = Option(discord.User, "The user, you want to greet")):
  10. await ctx.respond(f"Hello {user.mention}")
  11. def setup(bot: discord.Bot):
  12. bot.add_cog(Say(bot))