event

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NextEventStr   = "Next event"
	LatestEventStr = "Latest event"
	ActiveStr      = ":fire: Ending"
	NAEventStr     = "NA"
	SoonStr        = ":rotating_light:"
)
View Source
const (
	EventWB = iota
	EventHelltide
	EventLegions
)

iota number and EventsName array need to have the same order

Variables

View Source
var (
	EventsName          = []string{"World Boss", "Helltide", "Legion"}
	RegDiscordTime      *regexp.Regexp
	ActiveHelltideTimer time.Duration
	NextHelltideTimer   time.Duration
)
View Source
var Host string

Host API

Functions

func InitHost added in v0.8.0

func InitHost()

func TimerMsg

func TimerMsg(eventTimers []*EventTimer) discordgo.MessageEmbed

Types

type Boss added in v0.8.0

type Boss struct {
	Name             string `json:"name,omitempty"`
	ExpectedName     string `json:"expectedName,omitempty"`
	NextExpectedName string `json:"nextExpectedName,omitempty"`
	Timestamp        int    `json:"timestamp,omitempty"`
	Expected         int    `json:"expected,omitempty"`
	NextExpected     int    `json:"nextExpected,omitempty"`
	Territory        string `json:"territory,omitempty"`
	Zone             string `json:"zone,omitempty"`
}

type EventTimer

type EventTimer struct {
	Name    string
	Latest  time.Time
	Next    time.Time
	Active  bool
	Soon    bool
	Updated time.Time
}

func InitEventTimer added in v0.8.0

func InitEventTimer() []*EventTimer

func ParseTimerMsg

func ParseTimerMsg(dMsg *discordgo.Message, eventTimers []*EventTimer) []*EventTimer

func PopulateEventTimer added in v0.8.0

func PopulateEventTimer(eventTimers []*EventTimer, activeHelltide bool) ([]*EventTimer, error)

func RefreshEventTimers

func RefreshEventTimers(eventTimers []*EventTimer) ([]*EventTimer, error)

func (*EventTimer) GetLatestTimestamp

func (et *EventTimer) GetLatestTimestamp() string

func (*EventTimer) GetNextTimestamp

func (et *EventTimer) GetNextTimestamp() string

func (*EventTimer) SetLatestTimestamp

func (et *EventTimer) SetLatestTimestamp(ts string) error

func (*EventTimer) SetNext

func (et *EventTimer) SetNext(next time.Time)

func (*EventTimer) SetNextTimestamp

func (et *EventTimer) SetNextTimestamp(ts string) error

type Helltide added in v0.8.0

type Helltide struct {
	Timestamp int    `json:"timestamp,omitempty"`
	Zone      string `json:"zone,omitempty"`
	Refresh   int    `json:"refresh,omitempty"`
}

type Legion added in v0.8.0

type Legion struct {
	Timestamp    int    `json:"timestamp,omitempty"`
	Territory    string `json:"territory,omitempty"`
	Zone         string `json:"zone,omitempty"`
	Expected     int    `json:"expected,omitempty"`
	NextExpected int    `json:"nextExpected,omitempty"`
}

type Whispers added in v0.8.0

type Whispers struct {
	Quest int `json:"quest,omitempty"`
	End   int `json:"end,omitempty"`
}

Jump to

Keyboard shortcuts

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