discord

package
v0.0.0-...-816873b Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendRichMessage

func SendRichMessage(data DiscordWebhookMessage)

Types

type DiscordEmbed

type DiscordEmbed struct {
	Title       string              `json:"title"`
	Description string              `json:"description"`
	URL         string              `json:"url"`
	Timestamp   string              `json:"timestamp"`
	Color       int                 `json:"color"`
	Fields      []DiscordEmbedField `json:"fields"`
}

type DiscordEmbedField

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

type DiscordWebHook

type DiscordWebHook struct {
	URL     string
	Enabled bool
}

func (*DiscordWebHook) SendError

func (w *DiscordWebHook) SendError(message string, mention bool) error

func (*DiscordWebHook) SendMessage

func (w *DiscordWebHook) SendMessage(message string) error

type DiscordWebhookMessage

type DiscordWebhookMessage struct {
	Content string         `json:"content"`
	Embeds  []DiscordEmbed `json:"embeds"`
}

type SendParams

type SendParams struct {
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

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