Files
reforger_crawler_main/models/discordhook.go
2025-09-07 05:13:06 +02:00

35 lines
1.0 KiB
Go

package models
import (
"time"
)
type CustomImage struct {
URL string `json:"url,omitempty"`
}
// CustomEmbed mirrors the library's Embed but includes the Image field.
type CustomEmbed struct {
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
URL string `json:"url,omitempty"`
Timestamp time.Time `json:"timestamp,omitempty"`
Color int `json:"color,omitempty"`
Image CustomImage `json:"image,omitempty"` // Your new field
Fields []CustomEmbedField `json:"fields,omitempty"`
// You can add other fields like Footer, Author, Fields as needed.
}
type CustomEmbedField struct {
Name string `json:"name,omitempty"`
Value string `json:"value,omitempty"`
Inline bool `json:"inline,omitempty"`
}
// CustomHook is the top-level structure for the webhook payload.
type CustomHook struct {
Username string `json:"username,omitempty"`
Content string `json:"content,omitempty"`
Embeds []CustomEmbed `json:"embeds"`
}