<discord.embeds.Embed object at 0x0000021406379510>
;<discord.embeds.Embed object at 0x000001FE2A26F7F0>
; Ignoring exception in command ben:
Traceback (most recent call last):
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 92, in wrapped
ret = await coro(*args, **kwargs)
File "c:\Users\ak28r\Desktop\Vab-py\lol.py", line 203, in ben
await ctx.send(embed = embed)
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\abc.py", line 1089, in send
data = await state.http.send_message(
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 262, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 977, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 870, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 101, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
@bot.command()
async def test(ctx):
msg = await ctx.send(
"This message has a select menu!",
components=[
SelectMenu(
custom_id="test",
placeholder="Choose up to 2 options",
max_values=2,
options=[
SelectOption("Option 1", "value 1"),
SelectOption("Option 2", "value 2"),
SelectOption("Option 3", "value 3")
]
)
]
)
# Wait for someone to click on it
inter = await msg.wait_for_dropdown()
# Send what you received
labels = [option.label for option in inter.select_menu.selected_options]
await inter.reply(f"Options: {', '.join(labels)}")