Files
reforger_crawler_main/models/discordhook.go
Sotirios Pupakis ae534a87dd custom discord hook
2025-09-06 02:34:26 +02:00

28 lines
832 B
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
// You can add other fields like Footer, Author, Fields as needed.
}
// 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"`
}