Documentation ¶
Index ¶
- Constants
- func CancelRemoveRole(ctx context.Context, guildID, userID, roleID int64) error
- func CheckDiscordErrRetry(err error) bool
- func InitSchema() error
- func RegisterHandler(eventName string, dataFormat interface{}, handler HandlerFunc)
- func RegisterLegacyMigrater(eventName string, migrationHandler func(t time.Time, data string) error)
- func RegisterPlugin()
- func ScheduleDeleteMessages(guildID, channelID int64, when time.Time, messages ...int64) error
- func ScheduleEvent(evtName string, guildID int64, runAt time.Time, data interface{}) error
- func ScheduleRemoveRole(ctx context.Context, guildID, userID, roleID int64, when time.Time) error
- type DeleteMessagesEvent
- type HandlerFunc
- type RegisteredHandler
- type RmoveRoleData
- type ScheduledEvents
- func (se *ScheduledEvents) LateBotInit()
- func (se *ScheduledEvents) MigrateLegacyEvents()
- func (p *ScheduledEvents) PluginInfo() *common.PluginInfo
- func (p *ScheduledEvents) RunBackgroundWorker()
- func (p *ScheduledEvents) StopBackgroundWorker(wg *sync.WaitGroup)
- func (se *ScheduledEvents) StopBot(wg *sync.WaitGroup)
Constants ¶
View Source
const DBSchema = `` /* 406-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func CancelRemoveRole ¶ added in v1.16.0
func CheckDiscordErrRetry ¶ added in v1.11.0
func InitSchema ¶ added in v1.11.0
func InitSchema() error
func RegisterHandler ¶
func RegisterHandler(eventName string, dataFormat interface{}, handler HandlerFunc)
RegisterHandler registers a handler for the scpecified event name dataFormat is optional and should not be a pointer, it should match the type you're passing into ScheduleEvent
func RegisterLegacyMigrater ¶ added in v1.11.0
func RegisterLegacyMigrater(eventName string, migrationHandler func(t time.Time, data string) error)
RegisterHandler registers a handler for the scpecified event name dataFormat is optional and should not be a pointer, it should match the type you're passing into ScheduleEvent
func RegisterPlugin ¶
func RegisterPlugin()
func ScheduleDeleteMessages ¶ added in v1.13.0
func ScheduleEvent ¶ added in v1.11.0
Types ¶
type DeleteMessagesEvent ¶ added in v1.13.0
type HandlerFunc ¶
type HandlerFunc func(evt *models.ScheduledEvent, data interface{}) (retry bool, err error)
type RegisteredHandler ¶
type RegisteredHandler struct { EvtName string DataFormat interface{} Handler HandlerFunc }
type RmoveRoleData ¶ added in v1.16.0
type ScheduledEvents ¶
type ScheduledEvents struct {
// contains filtered or unexported fields
}
func (*ScheduledEvents) LateBotInit ¶ added in v1.11.5
func (se *ScheduledEvents) LateBotInit()
func (*ScheduledEvents) MigrateLegacyEvents ¶ added in v1.11.0
func (se *ScheduledEvents) MigrateLegacyEvents()
func (*ScheduledEvents) PluginInfo ¶ added in v1.17.0
func (p *ScheduledEvents) PluginInfo() *common.PluginInfo
func (*ScheduledEvents) RunBackgroundWorker ¶ added in v1.11.0
func (p *ScheduledEvents) RunBackgroundWorker()
func (*ScheduledEvents) StopBackgroundWorker ¶ added in v1.11.0
func (p *ScheduledEvents) StopBackgroundWorker(wg *sync.WaitGroup)
func (*ScheduledEvents) StopBot ¶ added in v1.11.0
func (se *ScheduledEvents) StopBot(wg *sync.WaitGroup)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.