discordSender

package
v0.0.0-...-34482f3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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"`
	Description string    `json:"description,omitempty"`
	Color       int       `json:"color,omitempty"`
	Url         string    `json:"url,omitempty"`
	Fields      []Field   `json:"fields,omitempty"`
	Thumbnail   Thumbnail `json:"thumbnail,omitempty"`
	Author      Author    `json:"author,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 Hook

type Hook struct {
	Content   string  `json:"content,omitempty"`
	Username  string  `json:"username,omitempty"`
	AvatarUrl string  `json:"avatar_url,omitempty"`
	Tts       bool    `json:"tts,omitempty"`
	Embeds    []Embed `json:"embeds,omitempty"`
}

type Provider

type Provider struct {
	Name string `json:"name,omitempty" example:"ACME Webhooks"`
	Url  string `json:"url,omitempty" example:"https://en.wikipedia.org/wiki/Acme_Corporation"`
}

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

func New

func New(secret string) (s *Sender)

func (*Sender) Send

func (s *Sender) Send(h Hook) (err error)

type Thumbnail

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

Jump to

Keyboard shortcuts

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