diff --git a/src/main/kotlin/cn/rtast/fancybot/commands/WeatherCommand.kt b/src/main/kotlin/cn/rtast/fancybot/commands/WeatherCommand.kt index ca55369..0480465 100644 --- a/src/main/kotlin/cn/rtast/fancybot/commands/WeatherCommand.kt +++ b/src/main/kotlin/cn/rtast/fancybot/commands/WeatherCommand.kt @@ -41,9 +41,12 @@ class WeatherCommand : BaseCommand() { val msg = MessageChain.Builder() .addAt(message.sender.userId) .addNewLine() - .addText("城市: ${lookupLocation.name}, 温度: ${weather.now.temp} ℃") + .addText("地区: ${lookupLocation.country}") + .addText("-${lookupLocation.adm1}") + .addText("-${lookupLocation.adm2}") + .addText("-${lookupLocation.name}") .addNewLine() - .addText("${weather.now.text}/${weather.now.windDir}") + .addText("温度: ${weather.now.temp} ℃ | ${weather.now.text}/${weather.now.windDir}") .addNewLine() .addText("数据来源: ${weather.refer.sources.joinToString(",")}") .build() diff --git a/src/main/kotlin/cn/rtast/fancybot/entity/weather/Geo.kt b/src/main/kotlin/cn/rtast/fancybot/entity/weather/Geo.kt index cd7441c..55b3d75 100644 --- a/src/main/kotlin/cn/rtast/fancybot/entity/weather/Geo.kt +++ b/src/main/kotlin/cn/rtast/fancybot/entity/weather/Geo.kt @@ -11,6 +11,10 @@ data class Geo( val location: List ) { data class Location( - val id: String + val name: String, + val id: String, + val adm1: String, + val adm2: String, + val country: String, ) } \ No newline at end of file