diff --git a/packages/reacord/library/core/reacord-discord-js.ts b/packages/reacord/library/core/reacord-discord-js.ts
index 33aacfb..7661b70 100644
--- a/packages/reacord/library/core/reacord-discord-js.ts
+++ b/packages/reacord/library/core/reacord-discord-js.ts
@@ -353,6 +353,17 @@ function getDiscordMessageOptions(reacordOptions: MessageOptions) {
}
}
+ if (component.type === "link") {
+ return {
+ type: Discord.ComponentType.Button,
+ url: component.url,
+ label: component.label ?? "",
+ style: Discord.ButtonStyle.Link,
+ disabled: component.disabled,
+ emoji: component.emoji,
+ }
+ }
+
if (component.type === "select") {
return {
...component,
@@ -364,7 +375,7 @@ function getDiscordMessageOptions(reacordOptions: MessageOptions) {
}
}
- raise(`Unsupported component type: ${component.type}`)
+ raise(`Unsupported component type: ${(component as any).type}`)
},
),
})),
diff --git a/packages/reacord/scripts/discordjs-manual-test.tsx b/packages/reacord/scripts/discordjs-manual-test.tsx
index ccb4bf4..ebf97db 100644
--- a/packages/reacord/scripts/discordjs-manual-test.tsx
+++ b/packages/reacord/scripts/discordjs-manual-test.tsx
@@ -6,6 +6,7 @@ import * as React from "react"
import { useState } from "react"
import {
Button,
+ Link,
Option,
ReacordDiscordJs,
Select,
@@ -132,3 +133,7 @@ await createTest("delete this", (channel) => {
}
reacord.send(channel.id, )
})
+
+await createTest("link", (channel) => {
+ reacord.send(channel.id, )
+})