From 414aef7eb31643c9d0fd6912a8b6ddd3633b481d Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Tue, 22 Jan 2019 00:21:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=88=BF=E9=97=B4=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MemberMsg.py | 4 ++-- api.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/MemberMsg.py b/MemberMsg.py index 88b644e..056d5a7 100644 --- a/MemberMsg.py +++ b/MemberMsg.py @@ -2,7 +2,7 @@ from User import User class MemberMsg: - type:int = -1 + type:int = 0 content:str = "" user:User = None @@ -23,7 +23,7 @@ class MemberMsg: return "{} 被禁言了".format(self.user) elif self.type == 4: return "{} 被取消禁言了".format(self.user) - elif self.type == 0: + elif self.type == 1: return "{} 进入了房间".format(self.user) else: return self.content diff --git a/api.py b/api.py index a0364de..c133ce2 100644 --- a/api.py +++ b/api.py @@ -42,7 +42,7 @@ class XiGuaLiveApi: print(*args) def onPresent(self, gift: Gift): - print("礼物连击:", gift) + print("礼物连击 : ", gift) def onPresentEnd(self, gift: Gift): print("感谢", gift) @@ -121,6 +121,7 @@ class XiGuaLiveApi: if "LiveMsgs" not in d["data"]: return for i in d['data']['LiveMsgs']: + print(i) if i['Method'] == "VideoLivePresentMessage": self.onPresent(Gift(i)) elif i['Method'] == "VideoLivePresentEndTipMessage":