Documentation
¶
Index ¶
- Constants
- Variables
- 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 QueueMessageWebhook(source, sourceID string, guildID, channel int64, msgStr string, ...)
- func RegisterPlugin()
- func RegisterSource(name string, source PluginWithErrorHandler)
- type CacheKeyWebhook
- type Plugin
- type PluginWithErrorHandler
- type PluginWithWebhookAvatar
- type QueuedElement
- type Webhook
- type WorkItem
Constants ¶
View Source
const DBSchema = `` /* 266-byte string literal not displayed */
Variables ¶
View Source
var ErrGuildNotFound = errors.New("Guild not found")
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 QueueMessageWebhook ¶ added in v1.16.2
func RegisterPlugin ¶ added in v1.4.1
func RegisterPlugin()
func RegisterSource ¶
func RegisterSource(name string, source PluginWithErrorHandler)
Types ¶
type CacheKeyWebhook ¶ added in v1.19.17
type CacheKeyWebhook int64
type Plugin ¶ added in v1.4.1
type Plugin struct {
}
func (*Plugin) LateBotInit ¶ added in v1.11.5
func (p *Plugin) LateBotInit()
func (*Plugin) PluginInfo ¶ added in v1.17.0
func (p *Plugin) PluginInfo() *common.PluginInfo
type PluginWithErrorHandler ¶
type PluginWithErrorHandler interface {
DisableFeed(elem *QueuedElement, err error)
}
type PluginWithWebhookAvatar ¶ added in v1.16.2
type PluginWithWebhookAvatar interface {
WebhookAvatar() string
}
type QueuedElement ¶
type QueuedElement struct {
Channel int64
Guild int64
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"`
UseWebhook bool
WebhookUsername string
}
type Webhook ¶ added in v1.16.2
func CreateWebhook ¶ added in v1.16.2
Click to show internal directories.
Click to hide internal directories.