From 05c1f4970205dc412b525fc82b79191150522c12 Mon Sep 17 00:00:00 2001 From: biast12 Date: Mon, 20 Apr 2026 15:52:56 +0200 Subject: [PATCH] Serialize Button.SkuId as JSON string Add the ,string JSON tag to Button.SkuId so uint64 SKU IDs are encoded/decoded as JSON strings. This avoids precision loss in JavaScript consumers and matches APIs that represent large numeric IDs as strings. --- objects/interaction/component/componentbutton.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objects/interaction/component/componentbutton.go b/objects/interaction/component/componentbutton.go index c764644..014e832 100644 --- a/objects/interaction/component/componentbutton.go +++ b/objects/interaction/component/componentbutton.go @@ -11,7 +11,7 @@ type Button struct { CustomId string `json:"custom_id,omitempty"` Style ButtonStyle `json:"style"` Emoji *emoji.Emoji `json:"emoji,omitempty"` - SkuId *uint64 `json:"sku_id,omitempty"` + SkuId *uint64 `json:"sku_id,string,omitempty"` Url *string `json:"url,omitempty"` Disabled bool `json:"disabled"` }