embed

package
v0.0.0-...-8fd61c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2024 License: BSD-3-Clause Imports: 1 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embed

type Embed 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"`
	Footer      *EmbedFooter    `json:"footer,omitempty"`
	Image       *EmbedImage     `json:"image,omitempty"`
	Thumbnail   *EmbedThumbnail `json:"thumbnail,omitempty"`
	Video       *EmbedVideo     `json:"video,omitempty"`
	Provider    *EmbedProvider  `json:"provider,omitempty"`
	Author      *EmbedAuthor    `json:"author,omitempty"`
	Fields      []*EmbedField   `json:"fields,omitempty"`
}

func NewEmbed

func NewEmbed() *Embed

func (*Embed) AddBlankField

func (e *Embed) AddBlankField(inline bool) *Embed

func (*Embed) AddField

func (e *Embed) AddField(title, content string, inline bool) *Embed

func (*Embed) SetAuthor

func (e *Embed) SetAuthor(name, url, iconUrl string) *Embed

func (*Embed) SetColor

func (e *Embed) SetColor(color int) *Embed

func (*Embed) SetDescription

func (e *Embed) SetDescription(description string) *Embed

func (*Embed) SetFooter

func (e *Embed) SetFooter(text, iconUrl string) *Embed

func (*Embed) SetImage

func (e *Embed) SetImage(url string) *Embed

func (*Embed) SetProvider

func (e *Embed) SetProvider(name, url string) *Embed

func (*Embed) SetThumbnail

func (e *Embed) SetThumbnail(url string) *Embed

func (*Embed) SetTimestamp

func (e *Embed) SetTimestamp(timestamp time.Time) *Embed

func (*Embed) SetTitle

func (e *Embed) SetTitle(title string) *Embed

func (*Embed) SetUrl

func (e *Embed) SetUrl(url string) *Embed

func (*Embed) SetVideo

func (e *Embed) SetVideo(url string) *Embed

type EmbedAuthor

type EmbedAuthor struct {
	Name         string `json:"name"`
	Url          string `json:"url,omitempty"`
	IconUrl      string `json:"icon_url,omitempty"`
	ProxyIconUrl string `json:"proxy_icon_url,omitempty"`
}

type EmbedField

type EmbedField struct {
	Name   string `json:"name"`
	Value  string `json:"value"`
	Inline bool   `json:"inline"`
}

type EmbedFooter

type EmbedFooter struct {
	Text         string `json:"text"`
	IconUrl      string `json:"icon_url,omitempty"`
	ProxyIconUrl string `json:"proxy_icon_url,omitempty"`
}

type EmbedImage

type EmbedImage struct {
	Url      string `json:"url"`
	ProxyUrl string `json:"proxy_url"`
	Height   int    `json:"height"`
	Width    int    `json:"width"`
}

type EmbedProvider

type EmbedProvider struct {
	Name string `json:"name"`
	Url  string `json:"name"`
}

type EmbedThumbnail

type EmbedThumbnail struct {
	Url      string `json:"url"`
	ProxyUrl string `json:"proxy_url"`
	Height   int    `json:"height"`
	Width    int    `json:"width"`
}

type EmbedVideo

type EmbedVideo struct {
	Url    string `json:"url"`
	Height int    `json:"height"`
	Width  int    `json:"width"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL