From 67c1e340c2d43fc858e4314256be5da0a349282f Mon Sep 17 00:00:00 2001 From: Funky Waddle Date: Sun, 29 Jun 2025 02:14:57 -0500 Subject: [PATCH] Start setting up poll command --- cogs/poll.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/cogs/poll.py b/cogs/poll.py index 4f442b8..95a9b0f 100644 --- a/cogs/poll.py +++ b/cogs/poll.py @@ -1,12 +1,23 @@ import discord -from discord.ext import commands +from discord import app_commands from libs.Cog import Cog class Poll(Cog): - @commands.command() - async def poll(self, ctx, *, question): - print("poll command called") + @Cog.listener() + async def on_ready(self): + pass + + @app_commands.command( + name="create_poll", + description="Create a poll", + ) + @app_commands.describe(question="The question for the poll") + @app_commands.describe(timing="How long (in minutes) to keep the poll open") + @app_commands.describe(choices="The comma-delimited list of choices") + async def create_poll(self, interaction: discord.Interaction, question: str, timing: int, choices: str): + interaction.response.send_message(f"The create_poll command is not set up yet. But thank you for trying", ephemeral=True) + print(f"POLL: {interaction.user.name} ran the poll command, asking for {question}") async def setup(bot): await bot.add_cog(Poll(bot))