Versions in this module Expand all Collapse all v1 v1.24.19 Mar 7, 2021 Changes in this version + type KeyFastFeeds string + type KeySlowFeeds string + type PubSubSubredditEventData struct + Slow bool + Subreddit string v1.20.6 Sep 3, 2019 Changes in this version + const FilterNSFWIgnore + const FilterNSFWNone + const FilterNSFWRequire + const GuildMaxFeedsNormal + const GuildMaxFeedsPremium + const MaxPostsHourFast + const MaxPostsHourSlow + const RedditLogoPNGB64 + var DBSchemas = []string + var KeyLastScannedPostIDFast = "reddit_last_post_id" + var KeyLastScannedPostIDSlow = "reddit_slow_last_post_id" + func CreatePostMessage(post *reddit.Link) (string, *discordgo.MessageEmbed) + func FindFeed(feeds []*models.RedditFeed, id int64) *models.RedditFeed + func HandleModify(w http.ResponseWriter, r *http.Request) interface + func HandleNew(w http.ResponseWriter, r *http.Request) interface + func HandleReddit(w http.ResponseWriter, r *http.Request) interface + func HandleRemove(w http.ResponseWriter, r *http.Request) interface + func MaxFeedForCtx(ctx context.Context) int + func RegisterPlugin() + func UserAgent() string + type CreateForm struct + Channel int64 + ID int64 + MinUpvotes int + NSFWMode int + Slow bool + Subreddit string + UseEmbeds bool + type CtxKey int + const CurrentConfig + type LegacySubredditWatchItem struct + Channel string + Guild string + ID int + Sub string + UseEmbeds bool + func FindLegacyWatchItem(source []*LegacySubredditWatchItem, id int) *LegacySubredditWatchItem + func GetLegacyConfig(key string) ([]*LegacySubredditWatchItem, error) + func (item *LegacySubredditWatchItem) Remove() error + func (item *LegacySubredditWatchItem) Set() error + type Plugin struct + func (p *Plugin) AddCommands() + func (p *Plugin) DisableFeed(elem *mqueue.QueuedElement, err error) + func (p *Plugin) InitWeb() + func (p *Plugin) LoadServerHomeWidget(w http.ResponseWriter, r *http.Request) (web.TemplateData, error) + func (p *Plugin) PluginInfo() *common.PluginInfo + func (p *Plugin) RemoveGuild(g int64) error + func (p *Plugin) StartFeed() + func (p *Plugin) StopFeed(wg *sync.WaitGroup) + func (p *Plugin) WebhookAvatar() string + type PostFetcher struct + LastID int64 + LastScannedPostIDKey string + Name string + StopChan chan *sync.WaitGroup + func NewPostFetcher(redditClient *greddit.Client, slow bool, handler PostHandler) *PostFetcher + func (p *PostFetcher) GetNewPosts() ([]*greddit.Link, error) + func (p *PostFetcher) Run() + type PostHandler interface + HandleRedditPosts func(links []*greddit.Link) + func NewPostHandler(slow bool) PostHandler + type PostHandlerImpl struct + Slow bool + func (p *PostHandlerImpl) FilterFeeds(feeds []*models.RedditFeed, post *reddit.Link) []*models.RedditFeed + func (p *PostHandlerImpl) HandleRedditPosts(links []*reddit.Link) + type RatelimitWindow struct + Guilds map[int64]int + ID int64 + T time.Time + type Ratelimiter struct + Windows []*RatelimitWindow + func NewRatelimiter() *Ratelimiter + func (r *Ratelimiter) CheckIncrement(t time.Time, guildID int64, limit int) bool + func (r *Ratelimiter) FullGC(t time.Time) + func (r *Ratelimiter) GC(t time.Time) bool + func (r *Ratelimiter) RunGCLoop() + type RedditIdSlice []string + func (r RedditIdSlice) Len() int + func (r RedditIdSlice) Less(i, j int) bool + func (r RedditIdSlice) Swap(i, j int) + type UpdateForm struct + Channel int64 + ID int64 + MinUpvotes int + NSFWMode int + UseEmbeds bool