This repository has been archived on 2022-03-09. You can view files and clone it, but cannot push or open issues or pull requests.
snoo2nebby/vendor/github.com/turnage/graw/config.go

42 lines
1.5 KiB
Go

package graw
import (
"log"
)
// Config configures a graw run or scan by specifying event sources. Each event
// type has a corresponding handler defined in graw/botfaces. The bot must be
// able to handle requested event types.
type Config struct {
// New posts in all subreddits named here will be forwarded to the bot's
// PostHandler.
Subreddits []string
// New posts in all users' custom feeds named here will be forwarded to the bot's
// PostHandler.
// Key is username, value is list of feeds
CustomFeeds map[string][]string
// New comments in all subreddits named here will be forwarded to the
// bot's CommentHandler.
SubredditComments []string
// New posts and comments made by all users named here will be forwarded
// to the bot's UserHandler. Note that since a separate monitor must be
// construced for every user, unlike subreddits, subscribing to the
// actions of many users can delay updates from other event sources.
Users []string
// When true, replies to posts made by the bot's account will be
// forwarded to the bot's PostReplyHandler.
PostReplies bool
// When true, replies to comments made by the bot's account will be
// forwarded to the bot's CommentReplyHandler.
CommentReplies bool
// When true, mentions of the bot's username will be forwarded to the
// bot's MentionHandler.
Mentions bool
// When true, messages sent to the bot's inbox will be forwarded to the
// bot's MessageHandler.
Messages bool
// If set, internal messages will be logged here. This is a spammy log
// used for debugging graw.
Logger *log.Logger
}