🔧Chore: 部分代码补充
This commit is contained in:
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,6 +30,11 @@ public class EventListener {
|
|||||||
.onP2BotMenuV6(new ApplicationService.P2BotMenuV6Handler() {
|
.onP2BotMenuV6(new ApplicationService.P2BotMenuV6Handler() {
|
||||||
@Override
|
@Override
|
||||||
public void handle(P2BotMenuV6 event) throws Exception {
|
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()));
|
System.out.printf("[ onP2BotMenuV6 access ], data: %s\n", Jsons.DEFAULT.toJson(event.getEvent()));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user