#Major issue

1 messages · Page 1 of 1 (latest)

gloomy oar
#
class TicketingModal(discord.ui.Modal):
    def __init__(self, *args, **kwargs) -> None:
        super().__init__(*args, **kwargs)
        self.add_item(discord.ui.InputText(label="Reason", style=discord.InputTextStyle.long))

    async def callback(self, interaction: discord.Interaction):
        await self.wait()
        embed = await funcs.custom_embed("Ticket", "A ticket has been opened")
        embed.add_field(name="Reason", value=self.children[0].value)
        return embed```

why won't the code wait for the modal to be completed by the user and why is embed of type interaction?
fringe jetty
#
  1. callback should be invoked once the user submits the Modal
  2. I don’t know what the funcs.custom_embed() function does, so it's impossible to know why interaction is returned