Skip to content

Commit 0f2affe

Browse files
committed
fix: put components back finally
1 parent e624ab1 commit 0f2affe

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

main.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,7 @@ Deno.serve(
7676
JSON.stringify({
7777
type: InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE,
7878
data: {
79-
content: "Pong",
80-
components: [
81-
{
82-
type: 1,
83-
components: [
84-
{
85-
type: 2, // Button
86-
style: 1, // Primary
87-
label: "Test",
88-
custom_id: `Test_${interaction.id}`
89-
}
90-
]
91-
}
92-
]
79+
content: "Pong"
9380
}
9481
}),
9582
{
@@ -175,7 +162,20 @@ Deno.serve(
175162
},
176163
method: "PATCH",
177164
body: JSON.stringify({
178-
content: message + "\n\n***Generating...***\n\n-# AI generated content, can make mistakes"
165+
content: message + "\n\n***Generating...***\n\n-# AI generated content, can make mistakes",
166+
components: [
167+
{
168+
type: 1,
169+
components: [
170+
{
171+
type: 2, // Button
172+
style: 4, // Danger
173+
label: "Stop",
174+
custom_id: `Abort_${interaction.id}`
175+
}
176+
]
177+
}
178+
]
179179
}),
180180
},
181181
);

0 commit comments

Comments
 (0)