From 6c167b73047cfcd1e0a8555904461cd49bd8c395 Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 18 Sep 2025 15:53:26 +0200 Subject: added say command --- cogs/say.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cogs/say.py (limited to 'cogs') diff --git a/cogs/say.py b/cogs/say.py new file mode 100644 index 0000000..93f04f4 --- /dev/null +++ b/cogs/say.py @@ -0,0 +1,23 @@ +from discord.ext import commands +import discord +import logging + +logger = logging.getLogger(__name__) + +class Say(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @discord.slash_command(name="say", description="senator, gadaj") + async def say( + self, + ctx: discord.ApplicationContext, + text: str = discord.Option(str, "Tekst do przeczytania", required=True) + ): + await ctx.defer() + await ctx.respond(content="\u200b", ephemeral=True) + await ctx.interaction.delete_original_response() + await ctx.send(content=text) + +def setup(bot): + bot.add_cog(Say(bot)) \ No newline at end of file -- cgit v1.2.3