From 2a887cd9a33f27cf68b4902034aa131e5f0b1bbd Mon Sep 17 00:00:00 2001 From: RTAkland Date: Thu, 5 Sep 2024 16:19:16 +0800 Subject: [PATCH] chore: format code --- .../cn/rtast/fancybot/commands/WeatherCommand.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/kotlin/cn/rtast/fancybot/commands/WeatherCommand.kt b/src/main/kotlin/cn/rtast/fancybot/commands/WeatherCommand.kt index df27faf..0b86b85 100644 --- a/src/main/kotlin/cn/rtast/fancybot/commands/WeatherCommand.kt +++ b/src/main/kotlin/cn/rtast/fancybot/commands/WeatherCommand.kt @@ -23,17 +23,11 @@ class WeatherCommand : BaseCommand() { val locationName = args.first() val lookupLocationId = Http.get( "https://geoapi.qweather.com/v2/city/lookup", - mapOf( - "location" to locationName, - "key" to configManager.qweatherKey - ) + mapOf("location" to locationName, "key" to configManager.qweatherKey) ).location.first().id val weather = Http.get( "https://devapi.qweather.com/v7/weather/now", - mapOf( - "location" to lookupLocationId, - "key" to configManager.qweatherKey - ) + mapOf("location" to lookupLocationId, "key" to configManager.qweatherKey) ) val msg = MessageChain.Builder() .addAt(message.sender.userId)