paginatedmessages

package
v1.19.9 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmojiNext = "➡"
	EmojiPrev = "⬅"
)

Variables

This section is empty.

Functions

func RegisterPlugin

func RegisterPlugin()

Types

type PaginatedMessage

type PaginatedMessage struct {
	// immutable fields, safe to access without a lock, don't write to these, i dont see why you would need to either...
	MessageID int64
	ChannelID int64
	GuildID   int64

	// mutable fields
	CurrentPage  int
	MaxPage      int
	LastResponse *discordgo.MessageEmbed
	Navigate     func(p *PaginatedMessage, newPage int) (*discordgo.MessageEmbed, error)
	// contains filtered or unexported fields
}

func CreatePaginatedMessage

func CreatePaginatedMessage(guildID, channelID int64, initPage, maxPages int, pagerFunc func(p *PaginatedMessage, page int) (*discordgo.MessageEmbed, error)) (*PaginatedMessage, error)

func (*PaginatedMessage) HandleReactionAdd

func (p *PaginatedMessage) HandleReactionAdd(ra *discordgo.MessageReactionAdd)

func (*PaginatedMessage) Stop

func (p *PaginatedMessage) Stop()

type Plugin

type Plugin struct{}

func (*Plugin) BotInit

func (p *Plugin) BotInit()

func (*Plugin) PluginInfo

func (p *Plugin) PluginInfo() *common.PluginInfo

func (*Plugin) StopBot

func (p *Plugin) StopBot(wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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