#🔒 discord.py help

5 messages · Page 1 of 1 (latest)

gloomy osprey
#

I'm trying to build a modal that has a string select menu. On discords developer website it shows select as being compatible in modals, and on discord.py's website it shows that select in modals was added in version 2.6.0, and I'm on 2.6.3. However, when I try to add a select in my modal and then test it, I get an error saying "Invalid Form Body
In data.components.1.components.0: Value of field "type" must be one of (4,).". What's wrong? Is my syntax just incorrect?

This is my modal function right now

class modalTest(discord.ui.Modal, title = "poopy stinky"):
    testfield = discord.ui.TextInput(label = "input poopy", style = discord.TextStyle.short, placeholder = "not poopy enough", required = True, max_length=2)
    select = discord.ui.Select(
        placeholder = "Select something",
        min_values = 1,
        max_values = 1,
        disabled = True,
        options = [discord.SelectOption(label = "option 1", value=0)]
    )
unique cragBOT
#

@gloomy osprey

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

willow current
#

As I'm learning about fission, it's quite confusing. Can anyone who has used it briefly explain its uses when deploying in practice?

unique cragBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.