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