Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache represents a thread-safe map
type CachedPost ¶
type CachedPost struct { AuthorID string Parent bool Children []*MessageInfo }
CachedEmbed stores information about an embed that's later retrieved in OnReactionAdd event to let original poster remove the embed or the entire gallery posted by Boe Tea if reaction was added on their original message. Children array is filled for parent messages only and it contains all embeds sent by Boe Tea by posting the message, including crossposted messages.
type EmbedCache ¶
type EmbedCache struct {
// contains filtered or unexported fields
}
func NewEmbedCache ¶
func NewEmbedCache() *EmbedCache
NewEmbedCache creates a new embed cache for storing IDs of embeds users posted.
func (*EmbedCache) Get ¶
func (ec *EmbedCache) Get(channelID, messageID string) (*CachedPost, bool)
func (*EmbedCache) Remove ¶
func (ec *EmbedCache) Remove(channelID, messageID string) bool
func (*EmbedCache) Set ¶
func (ec *EmbedCache) Set(userID, channelID, messageID string, parent bool, children ...*MessageInfo)
type MessageInfo ¶
MessageInfo is a message/channel ID pair.
Click to show internal directories.
Click to hide internal directories.