Documentation ¶
Index ¶
- type ButtonsConfig
- type ComponentOptions
- type Config
- type ConfigOpt
- func WithButtonsConfig(buttonsConfig ButtonsConfig) ConfigOpt
- func WithCleanupInterval(cleanupInterval time.Duration) ConfigOpt
- func WithCustomIDPrefix(prefix string) ConfigOpt
- func WithEmbedColor(color int) ConfigOpt
- func WithNoPermissionMessage(noPermissionMessage string) ConfigOpt
- func WithTimeout(timeout time.Duration) ConfigOpt
- type ExpireMode
- type Manager
- func (m *Manager) Create(responderFunc events.InteractionResponderFunc, pages Pages, ephemeral bool) error
- func (m *Manager) CreateMessage(client bot.Client, channelID snowflake.ID, pages Pages, ephemeral bool) (*discord.Message, error)
- func (m *Manager) OnEvent(event bot.Event)
- func (m *Manager) Update(responderFunc events.InteractionResponderFunc, pages Pages) error
- func (m *Manager) UpdateMessage(client bot.Client, channelID snowflake.ID, messageID snowflake.ID, pages Pages) (*discord.Message, error)
- type Pages
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ButtonsConfig ¶
type ButtonsConfig struct { First *ComponentOptions Back *ComponentOptions Stop *ComponentOptions Next *ComponentOptions Last *ComponentOptions }
type ComponentOptions ¶
type ComponentOptions struct { Emoji discord.ComponentEmoji Label string Style discord.ButtonStyle }
type Config ¶
type Config struct { ButtonsConfig ButtonsConfig NoPermissionMessage string CustomIDPrefix string EmbedColor int CleanupInterval time.Duration ExpireTime time.Duration }
func DefaultConfig ¶
func DefaultConfig() *Config
type ConfigOpt ¶
type ConfigOpt func(config *Config)
func WithButtonsConfig ¶
func WithButtonsConfig(buttonsConfig ButtonsConfig) ConfigOpt
func WithCleanupInterval ¶
func WithCustomIDPrefix ¶
func WithEmbedColor ¶
func WithNoPermissionMessage ¶
func WithTimeout ¶
type ExpireMode ¶
type ExpireMode int
const ( ExpireModeAfterCreation ExpireMode = iota ExpireModeAfterLastUsage )
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) CreateMessage ¶
type Pages ¶
type Pages struct { ID string PageFunc func(page int, embed *discord.EmbedBuilder) Pages int Creator snowflake.ID ExpireMode ExpireMode // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.