wizard

package
v0.0.0-...-518a455 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const CloseEmoji = "\U0000274c"

CloseEmoji is the ❌ emoji in Discord, used for the close-wizard button

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page interface {
	Embed(*Session) *discordgo.MessageEmbed
	Buttons(*Session) []string
	FireButton(session *Session, emoji string)
}

Page defines what functionality a wizard page should have.

type Session

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

Session is a wizard session, using embeds to display a menu in Discord and reactions for buttons.

func New

func New(discord *discordgo.Session, channel, user gophbot.Snowflake, page Page) (*Session, error)

New creates a new Wizard session.

func (*Session) SwitchToPage

func (s *Session) SwitchToPage(page Page) error

SwitchToPage causes this Session to switch to another page, and replace the buttons.

Jump to

Keyboard shortcuts

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