X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FTwitchBot%2FTwitchBot.php;h=63f4236f685e92bf659610257e93177a78cf7a11;hb=907f392f8d2fbadb3f53a277cc90ae080da6d476;hp=e5a5aa6e442307b06bbae8b68635a07f4255b463;hpb=609c66ecff96d467f6f267a68d709ab5e609e002;p=alttp.git diff --git a/app/TwitchBot/TwitchBot.php b/app/TwitchBot/TwitchBot.php index e5a5aa6..63f4236 100644 --- a/app/TwitchBot/TwitchBot.php +++ b/app/TwitchBot/TwitchBot.php @@ -23,6 +23,9 @@ class TwitchBot { if (!$this->token) { throw new \Exception('unable to find access token'); } + if ($this->token->hasExpired()) { + $this->token->refresh(); + } $this->connector = new Connector(); $this->connect();