action

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package action holds common bot actions that can be called via multiple sources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Joke

type Joke struct {
	Store store.Object
	Jokes
}

Joke action.

func NewJoke

func NewJoke(store store.Object) *Joke

NewJoke returns a new Joke Action.

func (*Joke) Random

func (j *Joke) Random(s *discordgo.Session) *discordgo.MessageEmbed

Random joke as a MessageEmbed.

func (*Joke) Refresh

func (j *Joke) Refresh() error

Refresh the joke set from the joke store.

type Jokes

type Jokes []struct {
	Author string
	Joke   string
}

Jokes defines the stored data.

type Menu struct {
	Store store.Object
	Items []string
}

Menu action.

func NewMenu

func NewMenu(store store.Object) *Menu

NewMenu returns a new Menu action.

func (m *Menu) Random(user string) string

Random menu item.

func (m *Menu) Refresh() error

Refresh the menu set from the menu store.

Jump to

Keyboard shortcuts

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