#Why o dpnt can import InputTextStyle?
1 messages · Page 1 of 1 (latest)
b!rtfm pyc Inputtextstyle
b!rtfm pyc components
Best matches for components in pyc
discord.components.ActionRow
discord.components.Button
discord.components.Component
discord.components.SelectMenu
discord.components.SelectOption
discord.ComponentType.select
discord.Message.components
discord.ext.commands.HelpCommand.remove_mentions
discord.ext.commands.DefaultHelpCommand.add_indented_commands
How can i fix this how i import or is this code wrong
@bot.slash_command(name="send-modal", description="Send a modal", scope=925511055034187788)
async def send_modal(ctx):
modal = Modal(
custom_id="modal",
title="Modal Title",
components=[
InputText(
style=InputTextStyle.short,
custom_id="text-input-1",
label="Short text input",
),
InputText(
style=InputTextStyle.long,
custom_id="text-input-2",
label="Paragraph text input",
),
],
)
await ctx.popup(modal)```
Error
`: Application Command raised an exception: TypeError: Modal.__init__() got an unexpected keyword argument 'components'`
Learn how you can implement Modals in your Discord Bot with Pycord!