Start setting up poll command

This commit is contained in:
Funky Waddle 2025-06-29 02:14:57 -05:00
parent b6a7a80f3c
commit 67c1e340c2

View file

@ -1,12 +1,23 @@
import discord import discord
from discord.ext import commands from discord import app_commands
from libs.Cog import Cog from libs.Cog import Cog
class Poll(Cog): class Poll(Cog):
@commands.command() @Cog.listener()
async def poll(self, ctx, *, question): async def on_ready(self):
print("poll command called") 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): async def setup(bot):
await bot.add_cog(Poll(bot)) await bot.add_cog(Poll(bot))