From 22938031f62357e1a3ac5e77b025356915b8e886 Mon Sep 17 00:00:00 2001 From: BroodjeAap Date: Tue, 27 Dec 2022 10:34:29 +0000 Subject: [PATCH] added gophergo to dependency list in readme --- README.md | 1 + main.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index c3f0b42..8ab5a60 100644 --- a/README.md +++ b/README.md @@ -283,6 +283,7 @@ The following libaries are used in Go-Watch: - [htmlquery](https://pkg.go.dev/github.com/antchfx/htmlquery) for XPath selectors - [validator](https://pkg.go.dev/github.com/go-playground/validator/v10@v10.11.0) for user user input validation - [tgbotapi](https://pkg.go.dev/github.com/go-telegram-bot-api/telegram-bot-api/v5@v5.5.1) for Telegram +- [discordgo](https://pkg.go.dev/github.com/bwmarrin/discordgo) for Discord - [cron](https://pkg.go.dev/github.com/robfig/cron/v3@v3.0.0) for job scheduling - [viper](https://pkg.go.dev/github.com/spf13/viper@v1.12.0) for config management - [gjson](https://pkg.go.dev/github.com/tidwall/gjson@v1.14.2) for JSON selectors diff --git a/main.go b/main.go index 3eca76c..490fff4 100644 --- a/main.go +++ b/main.go @@ -172,6 +172,12 @@ func (web *Web) initNotifiers() { web.notifiers["Discord"] = &discordBot } } + if viper.IsSet("notifiers.email") { + emailBot := notifiers.EmailNotifier{} + if emailBot.Open() { + web.notifiers["Email"] = &emailBot + } + } } func (web *Web) pruneDB() {