推送消息修改

This commit is contained in:
Womsxd 2022-01-30 16:17:47 +08:00
parent dfc8fa066e
commit f9c5ebe5d5
No known key found for this signature in database
GPG Key ID: 0FE76418EE689B68
3 changed files with 11 additions and 11 deletions

View File

@ -97,9 +97,9 @@ class Genshin:
log.warning("账号签到失败!") log.warning("账号签到失败!")
print(req.text) print(req.text)
if is_data["is_sign"] or data["retcode"] == 0 or data["retcode"] == -5003: if is_data["is_sign"] or data["retcode"] == 0 or data["retcode"] == -5003:
return_data += f"\n旅行者:{i[0]}已连续签到{sign_days}今天获得的奖励是{tools.get_item(self.sign_Give[sign_days])}" return_data += f"\n{i[0]}已连续签到{sign_days}\n今天获得的奖励是{tools.get_item(self.sign_Give[sign_days])}"
else: else:
return_data += f"\n旅行者:{i[0]},本次签到失败" return_data += f"\n{i[0]},本次签到失败"
else: else:
log.warning("账号没有绑定任何原神账号!") log.warning("账号没有绑定任何原神账号!")
return_data += "\n并没有绑定任何原神账号" return_data += "\n并没有绑定任何原神账号"

View File

@ -98,9 +98,9 @@ class Honkai3rd:
else: else:
log.info(f"舰长{i[0]}今天已经签到过了~\r\n今天获得的奖励是{tools.get_item(today_item)}") log.info(f"舰长{i[0]}今天已经签到过了~\r\n今天获得的奖励是{tools.get_item(today_item)}")
if is_data["is_sign"] or data["retcode"] == 0 or data["retcode"] == -5003: if is_data["is_sign"] or data["retcode"] == 0 or data["retcode"] == -5003:
return_data += f"\n舰长:{i[0]}已连续签到{self.sign_day}今天获得的奖励是{tools.get_item(today_item)}" return_data += f"\n{i[0]}已连续签到{self.sign_day}\n今天获得的奖励是{tools.get_item(today_item)}"
else: else:
return_data += f"\n舰长:{i[0]},本次签到失败" return_data += f"\n{i[0]},本次签到失败"
else: else:
log.warning("账号没有绑定任何崩坏3账号") log.warning("账号没有绑定任何崩坏3账号")
return_data += "\n并没有绑定任何崩坏3账号" return_data += "\n并没有绑定任何崩坏3账号"

14
main.py
View File

@ -39,9 +39,9 @@ def main():
bbs = mihoyobbs.mihoyobbs() bbs = mihoyobbs.mihoyobbs()
if bbs.Task_do["bbs_Sign"] and bbs.Task_do["bbs_Read_posts"] and bbs.Task_do["bbs_Like_posts"] and \ if bbs.Task_do["bbs_Sign"] and bbs.Task_do["bbs_Read_posts"] and bbs.Task_do["bbs_Like_posts"] and \
bbs.Task_do["bbs_Share"]: bbs.Task_do["bbs_Share"]:
bbs_message = f"今天已经全部完成了!一共获得{mihoyobbs.Today_have_getcoins}个米游币,目前有{mihoyobbs.Have_coins}个米游币" return_data += "\n" + f"今天已经全部完成了!\n"\
return_data += "\n" + bbs_message f"一共获得{mihoyobbs.Today_have_getcoins}个米游币\n目前有{mihoyobbs.Have_coins}个米游币"
log.info(bbs_message) log.info(f"今天已经全部完成了!一共获得{mihoyobbs.Today_have_getcoins}个米游币,目前有{mihoyobbs.Have_coins}个米游币")
else: else:
if config.mihoyobbs["bbs_Signin"]: if config.mihoyobbs["bbs_Signin"]:
bbs.signing() bbs.signing()
@ -52,10 +52,10 @@ def main():
if config.mihoyobbs["bbs_Share"]: if config.mihoyobbs["bbs_Share"]:
bbs.share_post() bbs.share_post()
bbs.Get_taskslist() bbs.Get_taskslist()
bbs_message = f"今天已经获得{mihoyobbs.Today_have_getcoins}个米游币"\ return_data += "\n" + f"今天已经获得{mihoyobbs.Today_have_getcoins}个米游币\n"\
f"还能获得{mihoyobbs.Today_getcoins}个米游币目前有{mihoyobbs.Have_coins}个米游币" f"还能获得{mihoyobbs.Today_getcoins}个米游币\n目前有{mihoyobbs.Have_coins}个米游币"
return_data += "\n" + bbs_message log.info(f"今天已经获得{mihoyobbs.Today_have_getcoins}个米游币,"
log.info(bbs_message) f"还能获得{mihoyobbs.Today_getcoins}个米游币,目前有{mihoyobbs.Have_coins}个米游币")
time.sleep(random.randint(2, 8)) time.sleep(random.randint(2, 8))
else: else:
return_data += "\n" + "米游社功能未启用!" return_data += "\n" + "米游社功能未启用!"