heartbeat

package
v0.0.0-...-f3179c4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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