Introduce new Competition const and replace SoccerSeason->Competition.
parent
8cd70b50de
commit
c91106b7cf
13
main.go
13
main.go
|
@ -23,8 +23,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Competition_Testing = 453
|
Competition_Testing_GermanLeague2 = 453
|
||||||
Competition_WorldChampionShip2018 = -1
|
Competition_Testing = 464
|
||||||
|
Competition_WorldChampionShip2018 = 467
|
||||||
|
|
||||||
|
Competition = Competition_WorldChampionShip2018
|
||||||
|
|
||||||
day = 24 * time.Hour
|
day = 24 * time.Hour
|
||||||
week = 7 * day
|
week = 7 * day
|
||||||
|
@ -115,7 +118,7 @@ func main() {
|
||||||
|
|
||||||
updateTopics := func() {
|
updateTopics := func() {
|
||||||
// Get football data
|
// Get football data
|
||||||
if r, err := footballData.FixturesOfSoccerSeason(Competition_Testing).Do(); err != nil {
|
if r, err := footballData.FixturesOfCompetition(Competition).Do(); err != nil {
|
||||||
log.Print(err)
|
log.Print(err)
|
||||||
} else {
|
} else {
|
||||||
currentMatches := []*footballdata.Fixture{}
|
currentMatches := []*footballdata.Fixture{}
|
||||||
|
@ -423,7 +426,7 @@ func main() {
|
||||||
updateTopicsChan <- nil
|
updateTopicsChan <- nil
|
||||||
|
|
||||||
case strings.EqualFold(cmd.Name, "!table"):
|
case strings.EqualFold(cmd.Name, "!table"):
|
||||||
if leagueTable, err := footballData.LeagueTableOfCompetition(Competition_Testing).Do(); err != nil {
|
if leagueTable, err := footballData.LeagueTableOfCompetition(Competition).Do(); err != nil {
|
||||||
if s, err := tplString("error", err); err != nil {
|
if s, err := tplString("error", err); err != nil {
|
||||||
log.Print(err)
|
log.Print(err)
|
||||||
} else {
|
} else {
|
||||||
|
@ -476,7 +479,7 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case strings.EqualFold(cmd.Name, "!match"):
|
case strings.EqualFold(cmd.Name, "!match"):
|
||||||
/*if r, err := footballData.FixturesOfSoccerSeason(SoccerSeason_EuropeanChampionShipsFrance2016).TimeFrame(1 * day).Do(); err != nil {
|
/*if r, err := footballData.FixturesOfCompetition(SoccerSeason_EuropeanChampionShipsFrance2016).TimeFrame(1 * day).Do(); err != nil {
|
||||||
if s, err := tplString("error", err); err != nil {
|
if s, err := tplString("error", err); err != nil {
|
||||||
log.Print(err)
|
log.Print(err)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue