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 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
Click to show internal directories.
Click to hide internal directories.