From 2372b7ebae4aabf7517c78cae222cb8672af3428 Mon Sep 17 00:00:00 2001 From: wonder Date: Sun, 26 Oct 2025 15:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=94=A7Chore:=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stardewvalley/handle/WeatherHandle.java | 18 ++++++++++++++++++ .../stardewvalley/util/lark/EventListener.java | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 src/main/java/com/wonderland/stardewvalley/handle/WeatherHandle.java diff --git a/src/main/java/com/wonderland/stardewvalley/handle/WeatherHandle.java b/src/main/java/com/wonderland/stardewvalley/handle/WeatherHandle.java new file mode 100644 index 0000000..125ca4a --- /dev/null +++ b/src/main/java/com/wonderland/stardewvalley/handle/WeatherHandle.java @@ -0,0 +1,18 @@ +package com.wonderland.stardewvalley.handle; + + +import com.wonderland.stardewvalley.entity.game.Weather; +import com.wonderland.stardewvalley.util.lark.LarkUtil; +import com.wonderland.stardewvalley.util.weather.WeatherUtil; +import jakarta.annotation.Resource; + +public class WeatherHandle { + + @Resource + private LarkUtil larkUtil; + + public void sendCard() throws Exception { + Weather weather = WeatherUtil.getWeather(); + larkUtil.sendWeatherCard(weather); + } +} diff --git a/src/main/java/com/wonderland/stardewvalley/util/lark/EventListener.java b/src/main/java/com/wonderland/stardewvalley/util/lark/EventListener.java index c37811f..86b117c 100644 --- a/src/main/java/com/wonderland/stardewvalley/util/lark/EventListener.java +++ b/src/main/java/com/wonderland/stardewvalley/util/lark/EventListener.java @@ -30,6 +30,11 @@ public class EventListener { .onP2BotMenuV6(new ApplicationService.P2BotMenuV6Handler() { @Override public void handle(P2BotMenuV6 event) throws Exception { + String eventKey = event.getEvent().getEventKey(); + if (eventKey.equals("weather")) { + // TODO 完善调用,发送天气卡片 + } + System.out.printf("[ onP2BotMenuV6 access ], data: %s\n", Jsons.DEFAULT.toJson(event.getEvent())); } })