下播判断

This commit is contained in:
2020-12-05 15:47:30 +08:00
parent 6b1a4a7b0a
commit 977cb9877f
2 changed files with 367 additions and 0 deletions

3
api.py
View File

@ -398,6 +398,9 @@ class XiGuaLiveApi:
elif _each.method == "WebcastChatMessage":
_chat = Chat(_each.raw)
self.onChat(_chat)
elif _each.method == "WebcastControlMessage":
# 下播的时候会有个这个
self.onLeave(None)
elif _each.method == "WebcastSocialMessage":
_socialMessage = SocialMessage()
_socialMessage.ParseFromString(_each.raw)