live

package
v0.0.0-...-d98e327 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const GameStatusApiUrl = "https://alpha.mythfall.com:7779/api/status"

Variables

View Source
var LiveBanners = []Banner{
	{
		ChannelId: "1201270649365213215",
		Func: func(b *BannerSystem) string {
			return fmt.Sprintf("🤺 Players: %d", b.cachedStatus.NumPlayers)
		},
	},
	{
		ChannelId: "1201270754419953765",
		Func: func(b *BannerSystem) string {
			lowestSphere := findSphereWithLowestStability(b.cachedStatus.Spheres)
			return fmt.Sprintf("🀄 Stability: %d", lowestSphere.Stability)
		},
	},
}

Functions

This section is empty.

Types

type Banner struct {
	ChannelId string
	Func      func(b *BannerSystem) string
}

type BannerSystem

type BannerSystem struct {
	// contains filtered or unexported fields
}

func NewBannerSystem

func NewBannerSystem(session *discordgo.Session, banners []Banner, refreshTime time.Duration) *BannerSystem

func (*BannerSystem) Listen

func (b *BannerSystem) Listen()

type GameStatus

type GameStatus struct {
	NumPlayers uint     `json:"NumPlayers"`
	Spheres    []Sphere `json:"Spheres"`
}

type Sphere

type Sphere struct {
	Stability uint64 `json:"Stability"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL