~exprez135/go-hypixel

99b73eee94f8b86e3cae3b1668fcb24ba3e4635e — Nate Ijams 3 years ago 224b7cf v0.0.14
Fix errors from recent updates.
3 files changed, 7 insertions(+), 5 deletions(-)

M engine/discord.go
M engine/tracking.go
M main.go
M engine/discord.go => engine/discord.go +3 -2
@@ 390,7 390,8 @@ func listTracked(ctx *exrouter.Context) {

func listOnline(ctx *exrouter.Context) {
	log.Println("STARTING listOnline() run...")
	players, friends, guilds, err := GetTrackedList("discord", ctx.Msg.GuildID)
	// players, friends, guilds, err
	_, _, guilds, err := GetTrackedList("discord", ctx.Msg.GuildID)

	if err != nil {
		log.Println("discord.listTracked:", err)


@@ 416,7 417,7 @@ func listOnline(ctx *exrouter.Context) {
		}

		// Append guildList to listOfPlayers
		listOfPlayers = append(listOfPlayers, guildList)
		listOfPlayers = append(listOfPlayers, guildList...)
	}

	// RemoveDuplicates(listOfPlayers)

M engine/tracking.go => engine/tracking.go +3 -3
@@ 6,7 6,7 @@ import (
	"github.com/boltdb/bolt"
	"log"
	"strconv"
	"time"
	//"time"
	// BELOW: choose the package you are using for your platform (e.g. Discord, IRC, etc)
	//"git.sr.ht/~exprez135/go-hypixel/discord"
)


@@ 222,10 222,10 @@ func GetCachedPlayerStatus(uuid string) bool {
		v := b.Get([]byte(uuid))
		if string(v) == "true" {
			result = true
		}
		else {
		} else {
			result = false
		}
		return nil
	})

	return result

M main.go => main.go +1 -0
@@ 8,6 8,7 @@ import (
	"syscall"

	"git.sr.ht/~exprez135/go-hypixel/engine"
	//"./engine"
)

var platformName = "discord"