Back to

Package heartbeat

Latest Go to latest

The latest major version is .

Published: Mar 17, 2020 | License: GPL3 | Module:


type ActionProvider

type ActionProvider interface {
	Init(*types.Config, *discord.Session, storage.Storer, *forum.ForumClient) (string, error)
	Register() []common.Action

ActionProvider describes a type that provides a registration function that provides a set of actions that have some random chance to be called on a schedule. The `chance` parameter controls the probability the `call` function is called each time a cron job specified by `schedule` occurs.

type Heartbeat

type Heartbeat struct {
	Config  *types.Config
	Discord *discord.Session
	Storage storage.Storer
	Forum   *forum.ForumClient

Heartbeat controls a set of plugins that do stuff periodically.

func (*Heartbeat) Init

func (a *Heartbeat) Init(
	config *types.Config,
	discord *discord.Session,
	api storage.Storer,
	fc *forum.ForumClient,
) (err error)


func (*Heartbeat) OnMessage

func (a *Heartbeat) OnMessage(discordgo.Message) (err error)


Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier