Documentation ¶
Index ¶
Constants ¶
View Source
const ( EmojiNext = "➡" EmojiPrev = "⬅" )
Variables ¶
View Source
var ErrNoResults = errors.New("No results")
Functions ¶
func PaginatedCommand ¶ added in v1.20.8
func PaginatedCommand(pageArgIndex int, cb PaginatedCommandFunc) dcmd.RunFunc
func RegisterPlugin ¶
func RegisterPlugin()
Types ¶
type PagerFunc ¶ added in v1.20.8
type PagerFunc func(p *PaginatedMessage, page int) (*discordgo.MessageEmbed, error)
type PaginatedCommandFunc ¶ added in v1.20.8
type PaginatedCommandFunc func(data *dcmd.Data, p *PaginatedMessage, page int) (*discordgo.MessageEmbed, error)
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 // contains filtered or unexported fields }
func CreatePaginatedMessage ¶
func CreatePaginatedMessage(guildID, channelID int64, initPage, maxPages int, pagerFunc PagerFunc) (*PaginatedMessage, error)
func (*PaginatedMessage) HandleReactionAdd ¶
func (p *PaginatedMessage) HandleReactionAdd(ra *discordgo.MessageReactionAdd)
func (*PaginatedMessage) Stop ¶
func (p *PaginatedMessage) Stop()
Click to show internal directories.
Click to hide internal directories.