discordwebhook

package
v0.0.0-...-74b0799 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MaxContentLength = 2000

MaxContentLength Maximum length of content field Ref: https://discord.com/developers/docs/resources/webhook#execute-webhook

Variables

This section is empty.

Functions

func Send

func Send(webhookURL string, request *Request) error

func SendWithContext

func SendWithContext(ctx context.Context, webhookURL string, request *Request) error

Types

type Request

type Request struct {
	Username  string `json:"username,omitempty"`
	AvatarURL string `json:"avatar_url,omitempty"`
	Content   string `json:"content"`
}

func (*Request) Validate

func (r *Request) Validate() error

Jump to

Keyboard shortcuts

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