webhook

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Setting

type Setting func(*Settings)

Setting is a function that configures a webhook.

func WithAvatar

func WithAvatar(uri string) Setting

WithAvatar sets the avatar of a webhook.

func WithChannelID

func WithChannelID(id string) Setting

WithChannelID sets the channel ID of a webhook.

func WithName

func WithName(name string) Setting

WithName sets the name of a webhook.

type Settings

type Settings struct {
	Name *optional.String `json:"name,omitempty"`
	// Avatar is a data URI scheme that support JPG, GIF, and PNG formats, see
	// https://discord.com/developers/docs/resources/user#avatar-data
	// for more information.
	Avatar    *optional.String `json:"avatar,omitempty"`
	ChannelID *optional.String `json:"channel_id,omitempty"`
}

Settings describes a webhook's settings.

func NewSettings

func NewSettings(opts ...Setting) *Settings

NewSettings returns new Settings to modify a webhook.

Jump to

Keyboard shortcuts

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