Documentation ¶
Index ¶
- func IncrIDCounter() (next int64)
- func QueueMessage(source, sourceID string, guildID, channel int64, msgStr string, ...)
- func QueueMessageEmbed(source, sourceID string, guildID, channel int64, embed *discordgo.MessageEmbed)
- func QueueMessageString(source, sourceID string, guildID, channel int64, message string)
- func RegisterPlugin()
- func RegisterSource(name string, source PluginWithErrorHandler)
- type Plugin
- type PluginWithErrorHandler
- type QueuedElement
- type WorkItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IncrIDCounter ¶ added in v1.4.7
func IncrIDCounter() (next int64)
func QueueMessage ¶ added in v1.4.7
func QueueMessage(source, sourceID string, guildID, channel int64, msgStr string, embed *discordgo.MessageEmbed)
func QueueMessageEmbed ¶
func QueueMessageEmbed(source, sourceID string, guildID, channel int64, embed *discordgo.MessageEmbed)
func QueueMessageString ¶
func RegisterPlugin ¶ added in v1.4.1
func RegisterPlugin()
func RegisterSource ¶
func RegisterSource(name string, source PluginWithErrorHandler)
Types ¶
type Plugin ¶ added in v1.4.1
type Plugin struct { }
func (*Plugin) LateBotInit ¶ added in v1.11.5
func (p *Plugin) LateBotInit()
type PluginWithErrorHandler ¶
type PluginWithErrorHandler interface {
HandleMQueueError(elem *QueuedElement, err error)
}
type QueuedElement ¶
type QueuedElement struct { ID int64 // Where this feed originated from, responsible for handling discord specific errors Source string // Could be stuff like reddit feed element id, youtube feed element id and so on SourceID string // The actual message as a simple string MessageStr string `json:",omitempty"` // The actual message as an embed MessageEmbed *discordgo.MessageEmbed `json:",omitempty"` // The channel to send the message in Channel int64 Guild int64 }
Click to show internal directories.
Click to hide internal directories.