Erreur d'authentification twitch

This commit is contained in:
Kepka Ludovic
2025-08-22 07:13:08 +02:00
committed by skylanix
parent d3ee280002
commit 464180e148

View File

@@ -33,6 +33,7 @@ class TwitchBot() :
async def _connect(self): async def _connect(self):
with webapp.app_context(): with webapp.app_context():
if _isConfigured() : if _isConfigured() :
try :
helper = ConfigurationHelper() helper = ConfigurationHelper()
self.twitch = await Twitch(helper.getValue('twitch_client_id'), helper.getValue('twitch_client_secret')) self.twitch = await Twitch(helper.getValue('twitch_client_id'), helper.getValue('twitch_client_secret'))
await self.twitch.set_user_authentication(helper.getValue('twitch_access_token'), USER_SCOPE, helper.getValue('twitch_refresh_token')) await self.twitch.set_user_authentication(helper.getValue('twitch_access_token'), USER_SCOPE, helper.getValue('twitch_refresh_token'))
@@ -42,6 +43,8 @@ class TwitchBot() :
# chat.register_event(ChatEvent.SUB, on_sub) # chat.register_event(ChatEvent.SUB, on_sub)
self.chat.register_command('hello', _helloCommand) self.chat.register_command('hello', _helloCommand)
self.chat.start() self.chat.start()
except Exception as e:
logging.error(f'twitch auth error {e}')
else: else:
logging.info("Twitch is not configured") logging.info("Twitch is not configured")