mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-08 16:20:02 +00:00
[core] Fix: Newly initialized bots crash when not authorized yet
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
c5d83f9b77
commit
caadb6b590
1 changed files with 4 additions and 1 deletions
3
main.go
3
main.go
|
@ -344,7 +344,10 @@ func main() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ircHdl != nil {
|
||||||
ircHdl.ExecuteJoins(config.Channels)
|
ircHdl.ExecuteJoins(config.Channels)
|
||||||
|
}
|
||||||
|
|
||||||
for _, c := range config.Channels {
|
for _, c := range config.Channels {
|
||||||
if err := twitchWatch.AddChannel(c); err != nil {
|
if err := twitchWatch.AddChannel(c); err != nil {
|
||||||
log.WithError(err).WithField("channel", c).Error("Unable to add channel to watcher")
|
log.WithError(err).WithField("channel", c).Error("Unable to add channel to watcher")
|
||||||
|
|
Loading…
Reference in a new issue