diff --git a/bun.lockb b/bun.lockb index 9da7931..cf3a7e4 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index f348d58..3127c7e 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@lilybird/jsx": "0.2.0", "@lilybird/transformers": "^0.2.0", "@paperdave/logger": "^3.0.1", + "@purplet/serialize": "^2.0.0", "@wolfram-alpha/wolfram-alpha-api": "^23.1004.144821-RELEASE", "algoliasearch": "^4.23.2", "bun-tracestrings": "github:oven-sh/bun.report", diff --git a/src/commands/ping.tsx b/src/commands/ping.tsx index bfcb5ab..dc93b43 100644 --- a/src/commands/ping.tsx +++ b/src/commands/ping.tsx @@ -1,6 +1,12 @@ -import { ApplicationCommand as JSXApplicationCommand } from "@lilybird/jsx"; +import { + ActionRow, + Button, + ApplicationCommand as JSXApplicationCommand, +} from "@lilybird/jsx"; import { ApplicationCommand } from "@lilybird/handlers"; +import { serializers as S } from "@purplet/serialize"; import { possibleClosedForm } from "../util.ts"; +import { ButtonStyle } from "lilybird"; export default { post: "GLOBAL", @@ -15,12 +21,29 @@ export default { possibleClosedForm(rest), ]); + const serialized = S.generic.encodeCustomId([ + ws, + wsClosedForm, + rest, + restClosedForm, + ]); + await interaction.editReply({ content: [ `🏓`, `WebSocket: \`${wsClosedForm} ms\``, `Rest: \`${restClosedForm} ms\``, ].join("\n"), + components: [ + +