From 3fa90820bf03300bba5f35b9a61695c362af9cd7 Mon Sep 17 00:00:00 2001 From: Yudaotor Date: Wed, 29 Mar 2023 13:02:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EsportsHelper/Match.py | 4 ++-- EsportsHelper/Rewards.py | 6 +++--- EsportsHelper/Twitch.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/EsportsHelper/Match.py b/EsportsHelper/Match.py index 97b8df2..501a730 100644 --- a/EsportsHelper/Match.py +++ b/EsportsHelper/Match.py @@ -60,8 +60,8 @@ def watchMatches(self, delay): isDrop, imgUrl, title = self.rewards.checkNewDrops() if isDrop: for tit in title: - self.log.info(f"ΩДΩ 发现新的掉落: {tit}") - print(f"[blue]ΩДΩ 发现新的掉落: {tit}[/blue]") + self.log.info(f"ΩДΩ {self.config.username}发现新的掉落: {tit}") + print(f"[blue]ΩДΩ {self.config.username}发现新的掉落: {tit}[/blue]") if self.config.connectorDropsUrl != "": self.rewards.notifyDrops(imgUrl=imgUrl, title=title) sleep(3) diff --git a/EsportsHelper/Rewards.py b/EsportsHelper/Rewards.py index 4eca8af..5fe1743 100644 --- a/EsportsHelper/Rewards.py +++ b/EsportsHelper/Rewards.py @@ -78,7 +78,7 @@ def notifyDrops(self, imgUrl, title): "msgtype": "link", "link": { "text": "Drop掉落提醒", - "title": f"{title[i]}", + "title": f"[{self.config.username}]{title[i]}", "picUrl": f"{imgUrl[i]}", "messageUrl": "https://lolesports.com/rewards" } @@ -88,7 +88,7 @@ def notifyDrops(self, imgUrl, title): elif "https://discord.com/api/webhooks" in self.config.connectorDropsUrl: embed = { "title": "掉落提醒", - "description": f"{title[i]}", + "description": f"[{self.config.username}]{title[i]}", "image": {"url": f"{imgUrl[i]}"}, "thumbnail": {"url": "https://www.cdnjson.com/images/2023/03/26/QQ20230326153220.jpg"}, "color": 6676471, @@ -101,7 +101,7 @@ def notifyDrops(self, imgUrl, title): time.sleep(5) elif "https://fwalert.com" in self.config.connectorDropsUrl: params = { - "text": f"{title[i]}" + "text": f"[{self.config.username}]{title[i]}" } requests.post(self.config.connectorDropsUrl, headers={"Content-type": "application/json"}, json=params) time.sleep(5) diff --git a/EsportsHelper/Twitch.py b/EsportsHelper/Twitch.py index 4a78ae8..c38e106 100644 --- a/EsportsHelper/Twitch.py +++ b/EsportsHelper/Twitch.py @@ -40,4 +40,4 @@ def setTwitchQuality(self) -> bool: except Exception as e: print_exc() self.log.error(format_exc()) - return False \ No newline at end of file + return False