a select menu is supposed to get summoned but somehow the code is throwing this error
from turtle import title
import discord
from discord.ext import commands
class Select(commands.Cog):
def __init__(self, bot):
self.bot = bot
@discord.ui.select(
placeholder = "Choose a Flavor!",
min_values = 1,
max_values = 1,
options = [
discord.SelectOption(
label="Vanilla",
description="Pick this if you like vanilla!"
),
discord.SelectOption(
label="Chocolate",
description="Pick this if you like chocolate!"
),
discord.SelectOption(
label="Strawberry",
description="Pick this if you like strawberry!"
)
]
)
async def select_callback(self, select, interaction):
await interaction.response.send_message(f"Awesome! I like {select.values[0]} too!")
@discord.slash_command(description="summon a select menu")
async def select(self, ctx):
await ctx.respond("Choose a flavor!", view=Select())
def setup(bot):
bot.add_cog(Select(bot))```
iam