discord

package
v0.0.0-...-09aa624 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWebhookNotConfigured = errors.New("webhook not configured")
	ErrUsedDefaultWebhook   = errors.New("webhook not configured, used default webhook")
)

Functions

func SendWebhookMessage

func SendWebhookMessage(name string, username, msg string) error

func SetupWebhooks

func SetupWebhooks(hooks map[string]string)

Types

type Author

type Author struct {
	Name    *string `json:"name,omitempty"`
	URL     *string `json:"URL,omitempty"`
	IconURL *string `json:"icon_URL,omitempty"`
}

type Embed

type Embed struct {
	Title       *string    `json:"title,omitempty"`
	URL         *string    `json:"URL,omitempty"`
	Description *string    `json:"description,omitempty"`
	Color       *string    `json:"color,omitempty"`
	Author      *Author    `json:"author,omitempty"`
	Fields      *[]Field   `json:"fields,omitempty"`
	Thumbnail   *Thumbnail `json:"thumbnail,omitempty"`
	Image       *Image     `json:"image,omitempty"`
	Footer      *Footer    `json:"footer,omitempty"`
}

type Field

type Field struct {
	Name   *string `json:"name,omitempty"`
	Value  *string `json:"value,omitempty"`
	Inline *bool   `json:"inline,omitempty"`
}
type Footer struct {
	Text    *string `json:"text,omitempty"`
	IconURL *string `json:"icon_URL,omitempty"`
}

type Image

type Image struct {
	URL *string `json:"URL,omitempty"`
}

type Message

type Message struct {
	Username  *string  `json:"username,omitempty"`
	AvatarURL *string  `json:"avatar_URL,omitempty"`
	Content   *string  `json:"content,omitempty"`
	Embeds    *[]Embed `json:"embeds,omitempty"`
}

type Thumbnail

type Thumbnail struct {
	URL *string `json:"URL,omitempty"`
}

Jump to

Keyboard shortcuts

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