Skip to content

having trouble with text inputs... #114

@piuvas

Description

@piuvas

this is my interaction handler:

proc interactionCreate(s: Shard, i: Interaction) {.event(discord).} =
  let data = i.data.get
  let text_input = MessageComponent(
    kind: Button,
  )
  case data.name
    of "example":
      for message in data.resolved.messages.values:
        await discord.api.interactionResponseMessage(
          i.id,
          i.token,
          kind = irtChannelMessageWithSource,
          response = InteractionCallbackDataMessage(
            content: "test",
            components: @[text_input],
          )
        )
    of "example2":
      echo "test"
    else:
      echo "test"

this is my error message...

Exception message: [400] Bad request.


 - [DiscordError]:: Invalid Form Body (50035)

    - data.data.components.0._errors: Field "type" is required to determine the model type.
 [RestError]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions