Skip to content

Commit d2b1c56

Browse files
committed
Fix USERSTATE parsing incorrect user
Fix USERSTATE parsing incorrect user
1 parent 7ff048a commit d2b1c56

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Master
1111

1212
- Bug fixes
1313
- Fix whispers that were not able to be parsed
14+
- Fix USERSTATE parsing incorrect user
1415

1516
- ext.commands
1617
- Bug fixes

twitchio/parse.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def parser(data: str, nick: str):
7373
):
7474
result = re.search(MESSAGE_RE, data)
7575
if not result:
76-
logger.error(f" ****** MESSAGE_RE Failed! ******")
76+
logger.error("****** MESSAGE_RE Failed! ******")
7777
return None # raise exception?
7878
user = result.group("useraddr").split("!")[0]
7979
action = result.group("action")
@@ -83,6 +83,9 @@ def parser(data: str, nick: str):
8383
if action == "WHISPER":
8484
channel = None
8585

86+
if action == "USERSTATE":
87+
user = None
88+
8689
if action in ACTIONS2:
8790
prebadge = groups[0].split(";")
8891
badges = {}

0 commit comments

Comments
 (0)