def __init__(self, channel: str, nickname: str, oauth: str, helix: 'twitch.Helix' = None): super().__init__() self.helix: 'twitch.Helix' = helix self.irc = chat.IRC(nickname, password=oauth) self.irc.incoming.subscribe(self._message_handler) self.irc.start() self.channel = channel self.irc.incoming.subscribe() self.joined: bool = False
def __init__(self, channel: Union[str, list], nickname: str, oauth: str, capture_commands: bool = False, helix: Optional['twitch.Helix'] = None): """ :param channel: Channel name :param nickname: User nickname :param oauth: Twitch OAuth :param helix: Optional Helix API """ super().__init__() self.helix: Optional['twitch.Helix'] = helix self.capture_commands = capture_commands self.irc = chat.IRC(nickname, password=oauth, capture_commands=self.capture_commands) self.irc.incoming.subscribe(self._message_handler) self.irc.start() self.channel = channel self.joined: bool = False
def __init__(self, channel: str, nickname: str, oauth: str, helix: Optional['twitch.Helix'] = None): """ :param channel: Channel name :param nickname: User nickname :param oauth: Twitch OAuth :param helix: Optional Helix API """ super().__init__() self.helix: Optional['twitch.Helix'] = helix self.irc = chat.IRC(nickname, password=oauth) self.irc.incoming.subscribe(self._message_handler) self.irc.start() self.channel = channel.lstrip('#') self.joined: bool = False