discord

package
v0.0.0-...-84c28f3 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discord

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

Discord represent discord notificator

func NewDiscord

func NewDiscord(configs config.Config, verbose bool, logger *log.Logger) (*Discord, error)

NewDiscord Discord's constructor

func (*Discord) IsEnabled

func (d *Discord) IsEnabled() bool

IsEnabled will return enable status

func (*Discord) Provider

func (d *Discord) Provider() string

Provider will return Notificator provider

func (*Discord) Send

func (d *Discord) Send(msg string) error

Send will send notification

type DiscordConfig

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

DiscordConfig represent discord config

type DiscordMessage

type DiscordMessage struct {
	Content   string `json:"content"`
	Username  string `json:"username"`
	AvatarURL string `json:"avatar_url"`
}

DiscordMessage represent discord request

type DiscordResponse

type DiscordResponse struct {
	Code    uint   `json:"code"`
	Message string `json:"message"`
}

DiscordResponse represent discord response

Jump to

Keyboard shortcuts

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