|
|
|
@ -13,6 +13,7 @@ import (
@@ -13,6 +13,7 @@ import (
|
|
|
|
|
func setupCommands() { |
|
|
|
|
reboot := Command{ |
|
|
|
|
Name: "Reboot", |
|
|
|
|
Help: "Reboot me, requires token from logs.", |
|
|
|
|
Keywords: []string{"reboot", "re", "restart"}, |
|
|
|
|
Exec: Reboot, |
|
|
|
|
} |
|
|
|
@ -20,6 +21,7 @@ func setupCommands() {
@@ -20,6 +21,7 @@ func setupCommands() {
|
|
|
|
|
|
|
|
|
|
bumpset := Command{ |
|
|
|
|
Name: "BumpSet", |
|
|
|
|
Help: "Set the bump timer (requires time in minutes until next bump).", |
|
|
|
|
Keywords: []string{"bs", "bumpset", "bumps"}, |
|
|
|
|
Exec: BumpSet, |
|
|
|
|
} |
|
|
|
@ -27,6 +29,7 @@ func setupCommands() {
@@ -27,6 +29,7 @@ func setupCommands() {
|
|
|
|
|
|
|
|
|
|
retrieveVerification := Command{ |
|
|
|
|
Name: "Retrieve Verification", |
|
|
|
|
Help: "Retrieve verification either by discord ID or by nickname", |
|
|
|
|
Keywords: []string{"veri", "verification", "retrieve"}, |
|
|
|
|
Exec: RetrieveVerification, |
|
|
|
|
} |
|
|
|
@ -90,6 +93,7 @@ func RetrieveVerification(b BotCommand) bool {
@@ -90,6 +93,7 @@ func RetrieveVerification(b BotCommand) bool {
|
|
|
|
|
user, err := s.GuildMember(config.GuildID, discordId) |
|
|
|
|
if err != nil { |
|
|
|
|
log.LogErrorType(err) |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
matches, err := filepath.Glob(fmt.Sprintf("./verifications/*%+v*", discordId)) |
|
|
|
@ -128,6 +132,7 @@ func Snap(b BotCommand) bool {
@@ -128,6 +132,7 @@ func Snap(b BotCommand) bool {
|
|
|
|
|
func Status(b BotCommand) bool { |
|
|
|
|
defer log.PanicSafe() |
|
|
|
|
status := fmt.Sprintf("Uptime: %+v\n", time.Since(startupTime)) |
|
|
|
|
status += fmt.Sprintf("Last active time: %+v\n", time.Since(lastActiveTime)) |
|
|
|
|
status += fmt.Sprintf("Last bump: %+v\n", time.Since(config.BumpTime)) |
|
|
|
|
status += fmt.Sprintf("Last bumper: <@%+v>\n", userFromID(config.LastBumper).Username) |
|
|
|
|
status += fmt.Sprintf("Bump needed: %+v\n", bump) |
|
|
|
@ -158,6 +163,8 @@ func Status(b BotCommand) bool {
@@ -158,6 +163,8 @@ func Status(b BotCommand) bool {
|
|
|
|
|
status += fmt.Sprintf("%+v for another %+v\n", probationUser.Username, time.Until(join.Add(2*time.Hour))) |
|
|
|
|
} |
|
|
|
|
status += "```" |
|
|
|
|
}else { |
|
|
|
|
status += "There are no users on probation." |
|
|
|
|
} |
|
|
|
|
b.Session.ChannelMessageSend(config.AdminChannel, status) |
|
|
|
|
statistics := "```" |
|
|
|
|