M engine/discord.go => engine/discord.go +6 -1
@@ 2,12 2,12 @@ package engine
import (
"log"
+ "math/rand"
"os"
"os/signal"
"strings"
"syscall"
"time"
- "math/rand"
"git.sr.ht/~exprez135/go-hypixel/api"
@@ 408,6 408,11 @@ func listOnline(ctx *exrouter.Context) {
// Fetch list of online UUIDs in the monitored guilds
onlineList := ListOnlinePlayers(guilds)
+ if len(onlineList) == 0 {
+ ctx.Reply("There are no players online. Do the bed defence yourself, dummy!")
+ return
+ }
+
// Get actual usernames for each UUID in onlineList
var userOnlineList []string
M engine/tracking.go => engine/tracking.go +1 -1
@@ 215,7 215,7 @@ func SendStatusNotifications(uuid string, newStatus bool) error {
// TODO add error checking
func GetCachedPlayerStatus(uuid string) bool {
- var result bool
+ var result = false
Iron.View(func(tx *bolt.Tx) error {
b := tx.Bucket([]byte("tracked"))