As mentioned in several issues, it would be nice to have a way to listen for the login failure.
In this PR I propose a very simple way to handle this : by adding an exception attribute to a chat.irc object, all users of the lib can listen for this attribute to be set with a TwitchChatError and raise this error.
This code does not conflict with the current state of the lib since it does not raise the Exception itself, but rather let the developpers listen for the event and raise or handle this themselves, therefore no compatibility issues.
As mentioned in several issues, it would be nice to have a way to listen for the login failure. In this PR I propose a very simple way to handle this : by adding an
exception
attribute to achat.irc
object, all users of the lib can listen for this attribute to be set with a TwitchChatError and raise this error.This code does not conflict with the current state of the lib since it does not raise the Exception itself, but rather let the developpers listen for the event and raise or handle this themselves, therefore no compatibility issues.
This is follwowing the issue https://github.com/PetterKraabol/Twitch-Python/issues/32#issue-812267731