mirror of
https://github.com/skylanix/MamieHenriette.git
synced 2026-02-15 20:40:39 +01:00
Erreur d'authentification twitch
This commit is contained in:
@@ -33,15 +33,18 @@ class TwitchBot() :
|
|||||||
async def _connect(self):
|
async def _connect(self):
|
||||||
with webapp.app_context():
|
with webapp.app_context():
|
||||||
if _isConfigured() :
|
if _isConfigured() :
|
||||||
helper = ConfigurationHelper()
|
try :
|
||||||
self.twitch = await Twitch(helper.getValue('twitch_client_id'), helper.getValue('twitch_client_secret'))
|
helper = ConfigurationHelper()
|
||||||
await self.twitch.set_user_authentication(helper.getValue('twitch_access_token'), USER_SCOPE, helper.getValue('twitch_refresh_token'))
|
self.twitch = await Twitch(helper.getValue('twitch_client_id'), helper.getValue('twitch_client_secret'))
|
||||||
self.chat = await Chat(self.twitch)
|
await self.twitch.set_user_authentication(helper.getValue('twitch_access_token'), USER_SCOPE, helper.getValue('twitch_refresh_token'))
|
||||||
self.chat.register_event(ChatEvent.READY, _onReady)
|
self.chat = await Chat(self.twitch)
|
||||||
self.chat.register_event(ChatEvent.MESSAGE, _onMessage)
|
self.chat.register_event(ChatEvent.READY, _onReady)
|
||||||
# chat.register_event(ChatEvent.SUB, on_sub)
|
self.chat.register_event(ChatEvent.MESSAGE, _onMessage)
|
||||||
self.chat.register_command('hello', _helloCommand)
|
# chat.register_event(ChatEvent.SUB, on_sub)
|
||||||
self.chat.start()
|
self.chat.register_command('hello', _helloCommand)
|
||||||
|
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")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user