having trouble with text inputs... #115
-
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...
|
Beta Was this translation helpful? Give feedback.
Answered by
ire4ever1190
Jul 11, 2023
Replies: 1 comment 3 replies
-
I was able to get it working by making the modal like this await discord.api.interactionResponseModal(i.id, i.token, InteractionCallbackDataModal(
custom_id: "test",
title: "test",
components: @[newActionRow(@[
MessageComponent(customID: some "lsdf", kind: TextInput, inputStyle: some Short, inputLabel: some "hello")
])
]
)) |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
derspyy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was able to get it working by making the modal like this