aboutsummaryrefslogtreecommitdiffstats
path: root/cogs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cogs/say.py23
1 files changed, 23 insertions, 0 deletions
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 @@
1from discord.ext import commands
2import discord
3import logging
4
5logger = logging.getLogger(__name__)
6
7class Say(commands.Cog):
8 def __init__(self, bot):
9 self.bot = bot
10
11 @discord.slash_command(name="say", description="senator, gadaj")
12 async def say(
13 self,
14 ctx: discord.ApplicationContext,
15 text: str = discord.Option(str, "Tekst do przeczytania", required=True)
16 ):
17 await ctx.defer()
18 await ctx.respond(content="\u200b", ephemeral=True)
19 await ctx.interaction.delete_original_response()
20 await ctx.send(content=text)
21
22def setup(bot):
23 bot.add_cog(Say(bot)) \ No newline at end of file