This commit is contained in:
lyx0 2023-01-04 15:24:40 +01:00
parent b93d10f625
commit ee893cbea3
2 changed files with 6 additions and 7 deletions

View file

@ -22,7 +22,6 @@ type config struct {
twitchOauth string
twitchClientId string
twitchClientSecret string
twitchAccessToken string
commandPrefix string
environment string
db struct {
@ -92,6 +91,9 @@ func main() {
"err", err,
)
}
sugar.Infow("Got new helix AppAccessToken",
"helixClient", helixResp,
)
// Set the access token on the client
helixClient.SetAppAccessToken(helixResp.Data.AccessToken)

View file

@ -82,7 +82,7 @@ func (app *Application) AddTimer(name string, message twitch.PrivateMessage) {
"timer", timer,
"error", err,
)
reply := fmt.Sprintf("Something went wrong FeelsBadMan received wrong time format. Allowed formats: 30m, 10h, 10h30m")
reply := "Something went wrong FeelsBadMan received wrong time format. Allowed formats: 30m, 10h, 10h30m"
common.Send(message.Channel, reply, app.TwitchClient)
return
}
@ -98,7 +98,7 @@ func (app *Application) EditTimer(name string, message twitch.PrivateMessage) {
"timer", old,
"error", err,
)
reply := fmt.Sprintf("Something went wrong FeelsBadMan")
reply := "Something went wrong FeelsBadMan"
common.Send(message.Channel, reply, app.TwitchClient)
return
}
@ -198,7 +198,7 @@ func (app *Application) EditTimer(name string, message twitch.PrivateMessage) {
"timer", timer,
"error", err,
)
reply := fmt.Sprintf("Something went wrong FeelsBadMan received wrong time format. Allowed formats: 30s, 30m, 10h, 10h30m")
reply := "Something went wrong FeelsBadMan received wrong time format. Allowed formats: 30s, 30m, 10h, 10h30m"
common.Send(message.Channel, reply, app.TwitchClient)
return
}
@ -241,14 +241,12 @@ func (app *Application) InitialTimers() {
app.Logger.Infow("Initial timers",
"timer", ts,
)
return
}
// newPrivateMessageTimer is a helper function to set timers
// which trigger into sending a twitch PrivateMessage.
func (app *Application) newPrivateMessageTimer(channel, text string) {
common.Send(channel, text, app.TwitchClient)
return
}
// DeleteTimer takes in the name of a timer and tries to delete the timer from the database.
@ -277,5 +275,4 @@ func (app *Application) DeleteTimer(name string, message twitch.PrivateMessage)
reply := fmt.Sprintf("Deleted timer with name %s", name)
common.Send(message.Channel, reply, app.TwitchClient)
return
}