discord

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 6 Imported by: 0

README

= Discord plugin
:toc: macro

The discord plugin provides alerts that send messages to Discord channels.

== Alerts

=== discord.message

[source,goplum]
----
alert discord.message "example" {
  url = "https://discord.com/api/webhooks/.../..."
}
----

Sends a Discord message via a webhook. To enable incoming webhooks go to
Channel Settings → Integrations → Webhook → New Webhook.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageAlert

type MessageAlert struct {
	Url string
}

func (MessageAlert) Send

func (m MessageAlert) Send(details goplum.AlertDetails) error

func (MessageAlert) Validate

func (m MessageAlert) Validate() error

type Plugin

type Plugin struct{}

func (Plugin) Alert

func (p Plugin) Alert(kind string) goplum.Alert

func (Plugin) Check

func (p Plugin) Check(_ string) goplum.Check

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳