#help
1 messages · Page 1 of 1 (latest)
Saying it doesn't work or asking what's wrong with this code? is not helpful for yourself or others.
Describe what you expect and/or tried (with your code), and what isn't going right.
Please provide any errors you get for optimal assistance.
class Select(discord.ui.Select):
def __init__(self):
options=[
discord.SelectOption(label="Moderacyjne",emoji="🛠",description="wyświetla komendy moderacyjne"),
discord.SelectOption(label="4-fun",emoji="✨",description="wyświetla komendy 4-fun"),
]
super().__init__(placeholder="Select an option",max_values=1,min_values=1,options=options)
async def callback(self, interaction: discord.Interaction):
if self.values[0] == "Moderacyjne":
embed = discord.Embed(title="test", description="test")
await interaction.response.edit_message(embed=embed)
elif self.values[0] == "4-fun":
await interaction.response.edit_message("This is the second option from the list entire wooo!")
class SelectView(discord.ui.View):
def __init__(self, *, timeout = 180):
super().__init__(timeout=timeout)
self.add_item(Select())
@bot.command()
async def menu(ctx):
await ctx.send("Menus!",view=SelectView())```
File "C:\Users\Olesz\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\view.py", line 375, in _scheduled_task
await item.callback(interaction)
File "C:\Users\Olesz\Desktop\py\bot.py", line 70, in callback
await interaction.response.edit_message("This is the second option from the list entire wooo!")
TypeError: InteractionResponse.edit_message() takes 1 positional argument but 2 were given```
@everyone
@here
content=""