|
|
|
@ -92,6 +92,14 @@ func setupCommands() {
@@ -92,6 +92,14 @@ func setupCommands() {
|
|
|
|
|
Help: "List activity for the discord. Supply a number to get the top N users (5 would be top 5 users) or all for all users!", |
|
|
|
|
} |
|
|
|
|
commands = append(commands, activityReport) |
|
|
|
|
urlWhitelist := Command{ |
|
|
|
|
Name: "Whitelist URL", |
|
|
|
|
RequiresAdmin: true, |
|
|
|
|
Keywords: []string{"whitelist"}, |
|
|
|
|
Exec: WhitelistURL, |
|
|
|
|
Help: "Add a domain to the HTTP whitelist domains are in the format `thisvid.com` without the subdomain.", |
|
|
|
|
} |
|
|
|
|
commands = append(commands, urlWhitelist) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func Commands(b BotCommand) bool { |
|
|
|
@ -281,3 +289,9 @@ func Status(b BotCommand) bool {
@@ -281,3 +289,9 @@ func Status(b BotCommand) bool {
|
|
|
|
|
go runPurge(b.Session) |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func WhitelistURL(b BotCommand) bool { |
|
|
|
|
defer log.PanicSafe() |
|
|
|
|
config.WhitelistURLs = append(config.WhitelistURLs, strings.ReplaceAll(b.Message.Content, b.Command, "")) |
|
|
|
|
return true; |
|
|
|
|
} |