Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher struct {
// The database instance.
DB *gorm.DB
// The discord session.
Session *discordgo.Session
// A custom HTTP client.
Client *http.Client
// The discord command Prefix. Usually '!'.
Prefix string
// The web page changes ratio. Must be between 0 and 1.
// Every x minutes the watcher will fetch the website page and compares it with the previous version.
// It will check changes and convert these changes to a ratio. If page are identical, this ratio is equals to 1.0,
// and it will decrease for every detected change.
ChangeRatio float64
// The WatchInterval determines the interval at which the watcher will crawl web pages.
WatchInterval time.Duration
// A list of running tasks.
Tasks map[string]context.CancelFunc
}
Click to show internal directories.
Click to hide internal directories.