FunkyBot/cogs/poll.py

24 lines
861 B
Python
Raw Permalink Normal View History

2025-06-16 08:06:06 +00:00
import discord
2025-06-29 07:14:57 +00:00
from discord import app_commands
2025-06-16 08:06:06 +00:00
from libs.Cog import Cog
class Poll(Cog):
2025-06-29 07:14:57 +00:00
@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}")
2025-06-16 08:06:06 +00:00
async def setup(bot):
await bot.add_cog(Poll(bot))