bot

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

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

func New

func New(ctx context.Context, config models.ConfigDiscord, al *alertmanager.Client, debug bool) (b *Bot, err error)

New creates a new bot instance. It will make a few calls to Discord to validate the bot config. Make sure to call Run() to start the bot.

func (*Bot) Run

func (b *Bot) Run(ctx context.Context) error

Run starts the bot. It will block until the context is canceled, in which it will then gracefully shutdown, disconnecting from Discord.

Jump to

Keyboard shortcuts

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