From b9d06407079d4745f3c819a9b01bbe138d75673c Mon Sep 17 00:00:00 2001 From: liyunze <50455574+liyunze-coding@users.noreply.github.com> Date: Sat, 22 Nov 2025 10:04:16 +1100 Subject: [PATCH] updated license --- LICENSE | 21 +++++++++++++++++++++ src/commands/weather.rs | 8 +++----- 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7be429f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Deakin Software Engineering Club + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/commands/weather.rs b/src/commands/weather.rs index 13ea229..43622bf 100644 --- a/src/commands/weather.rs +++ b/src/commands/weather.rs @@ -14,8 +14,6 @@ async fn get_weather(location: String) -> Result { // retrieve weather data let response = reqwest::get(request_url).await?.text().await?; - // process weather data - Ok(response) } @@ -48,9 +46,9 @@ pub async fn weather( .field("Condition", format!("{}", weather_condition), true) .field("Temperature", format!("{} °C", weather_temp), true) .field("Feels like", format!("{} °C", weather_feels_like), true) - .field("wind", format!("{} kph", weather_wind_kph), true) - .field("humidity", format!("{}%", weather_humidity), true) - .field("cloud", format!("{}%", weather_cloud), true) + .field("Wind", format!("{} kph", weather_wind_kph), true) + .field("Humidity", format!("{}%", weather_humidity), true) + .field("Cloud", format!("{}%", weather_cloud), true) .thumbnail(format!("https:{}", weather_icon)); ctx.send(CreateReply::default().embed(embed)).await?;