From 22bda245fb3cb8da20cff8be53e0261c77240623 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sat, 4 Dec 2021 01:14:13 -0700 Subject: misc: housekeeping --- archive.go | 6 +++--- go.mod | 6 +++--- keep.go | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/archive.go b/archive.go index 8beef81..e7830db 100644 --- a/archive.go +++ b/archive.go @@ -15,7 +15,7 @@ var ( TIMEOUT time.Duration = 25 client *http.Client = &http.Client{Timeout: TIMEOUT * time.Second} - blocklist = []string{"cdn.discordapp.com", "discord.com", "tenor.com", + ignoreList = []string{"cdn.discordapp.com", "discord.com", "tenor.com", "c.tenor.com", "archive.org", "web.archive.org", "youtu.be", "youtube.com", "www.youtube.com", "discord.gg", "media.discordapp.net", "open.spotify.com"} @@ -34,9 +34,9 @@ type Closest struct { Status string `json:"status"` } -func isBlacklisted(host string) bool { +func isIgnored(host string) bool { - for _, h := range blocklist { + for _, h := range ignoreList { if host == h { return true diff --git a/go.mod b/go.mod index e6473ed..167d5f5 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module keep go 1.16 require ( - github.com/bwmarrin/discordgo v0.23.2 // indirect - github.com/mattn/go-sqlite3 v1.14.9 // indirect - golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c // indirect + github.com/bwmarrin/discordgo v0.23.2 + github.com/mattn/go-sqlite3 v1.14.9 + golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c ) diff --git a/keep.go b/keep.go index 52c245a..46361b5 100644 --- a/keep.go +++ b/keep.go @@ -169,8 +169,8 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { continue } - // Ensure host is not present in blacklisted set - if isBlacklisted(u.Host) { + // Ensure host is not present in ignoreList set + if isIgnored(u.Host) { continue } -- cgit v1.2.3-54-g00ecf