aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2021-12-04 01:14:13 -0700
committerJordan <me@jordan.im>2021-12-04 01:14:13 -0700
commit22bda245fb3cb8da20cff8be53e0261c77240623 (patch)
tree94396edc7c2415dd87ebd26ac251e379d26ce116
parentaf2549c3efb509418f4a24476a13b40673ea7186 (diff)
downloadkeep-22bda245fb3cb8da20cff8be53e0261c77240623.tar.gz
keep-22bda245fb3cb8da20cff8be53e0261c77240623.zip
misc: housekeeping
-rw-r--r--archive.go6
-rw-r--r--go.mod6
-rw-r--r--keep.go4
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
}