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]
this is my interaction handler:
this is my error message...