修正部分代码

This commit is contained in:
Jerry Yan 2019-01-20 23:28:04 +08:00
parent ab06868f06
commit e3b82555d6
3 changed files with 4 additions and 3 deletions

View File

@ -42,7 +42,7 @@ class Gift:
giftN = self.giftList[self.ID]["Name"]
else:
giftN = "未知礼物[{}]".format(self.ID)
return "感谢 {user} 送出的 {count}{name}".format(user= self.user, count= self.count, name= giftN)
return "{user} 送出的 {count}{name}".format(user= self.user, count= self.count, name= giftN)
def __unicode__(self):
return self.__str__()

View File

@ -146,7 +146,7 @@ class WinMain(Api):
def onPresentEnd(self, gift: Gift):
set_cmd_text_color(BACKGROUND_WHITE | FOREGROUND_BLACK)
print(gift)
print("感谢", gift)
resetColor()
def onLike(self, user: User):
@ -155,6 +155,7 @@ class WinMain(Api):
def onLeave(self, json: any):
return
def warning(*args):
print(*args)

2
api.py
View File

@ -43,7 +43,7 @@ class XiGuaLiveApi:
print("礼物连击:", gift)
def onPresentEnd(self, gift: Gift):
print("礼物", gift)
print("感谢", gift)
def onAd(self, i):
# print(i)