mirror of
https://git.sr.ht/~ashkeel/strimertul
synced 2024-09-20 02:00:49 +00:00
Fix twitch status poll crashing when twitch is not configured
This commit is contained in:
parent
7247095f00
commit
a6b8ffa877
2 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
- Fixed `game` command not working when the specified channel contained the @ symbol at the beginning.
|
- Fixed `game` command not working when the specified channel contained the @ symbol at the beginning.
|
||||||
- Fixed strimertul crashing at start if the database folder didn't exist and a database driver was not manually specified
|
- Fixed strimertul crashing at start if the database folder didn't exist and a database driver was not manually specified
|
||||||
|
- Fixed strimertul crashing after a minute of being open if Twitch was not configured.
|
||||||
|
|
||||||
## [2.1.1] - 2022-03-24
|
## [2.1.1] - 2022-03-24
|
||||||
|
|
||||||
|
|
|
@ -143,6 +143,11 @@ func (c *Client) runStatusPoll() {
|
||||||
// Wait for next poll
|
// Wait for next poll
|
||||||
time.Sleep(60 * time.Second)
|
time.Sleep(60 * time.Second)
|
||||||
|
|
||||||
|
// Make sure we're configured and connected properly first
|
||||||
|
if !c.Config.Enabled || c.Bot == nil || c.Bot.config.Channel == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// Check if streamer is online, if possible
|
// Check if streamer is online, if possible
|
||||||
func() {
|
func() {
|
||||||
status, err := c.API.GetStreams(&helix.StreamsParams{
|
status, err := c.API.GetStreams(&helix.StreamsParams{
|
||||||
|
|
Loading…
Reference in a new issue