From 8d439d9d547508204275020356f7343a8a2dc239 Mon Sep 17 00:00:00 2001 From: toast Date: Wed, 13 Mar 2024 20:09:09 +1100 Subject: [PATCH] I think I like the old ready notification --- Cargo.lock | 2 +- Cargo.toml | 6 +++--- src/commands/gameserver.rs | 2 +- src/commands/status.rs | 4 ++-- src/main.rs | 5 ++--- src/utils.rs | 2 ++ 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4da71d8..1da9b39 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -833,7 +833,7 @@ dependencies = [ [[package]] name = "kon" -version = "0.1.19" +version = "0.1.20" dependencies = [ "cargo_toml", "gamedig", diff --git a/Cargo.toml b/Cargo.toml index 06979cd..ef28fc0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kon" -version = "0.1.19" -rust-version = "1.74" +version = "0.1.20" +rust-version = "1.75" edition = "2021" [dependencies] @@ -27,6 +27,6 @@ opt-level = 0 debug = true [profile.release] -opt-level = 3 +opt-level = 2 debug = false strip = true diff --git a/src/commands/gameserver.rs b/src/commands/gameserver.rs index 61b94a5..fac8928 100644 --- a/src/commands/gameserver.rs +++ b/src/commands/gameserver.rs @@ -1,6 +1,6 @@ use crate::{ Error, - EMBED_COLOR, + utils::EMBED_COLOR, models::gameservers::Gameservers }; diff --git a/src/commands/status.rs b/src/commands/status.rs index fbbba09..b6c3bad 100644 --- a/src/commands/status.rs +++ b/src/commands/status.rs @@ -1,9 +1,9 @@ use crate::{ Error, - EMBED_COLOR, models::gameservers::Gameservers, commands::gameserver::ac_server_name, - utils::BOT_VERSION + utils::BOT_VERSION, + utils::EMBED_COLOR }; use std::{ diff --git a/src/main.rs b/src/main.rs index 4c3763a..9defd44 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,7 +22,6 @@ use serenity::{ type Error = Box; -pub static EMBED_COLOR: i32 = 0x5a99c7; static BOT_READY_NOTIFY: u64 = 865673694184996888; async fn on_ready( @@ -34,9 +33,9 @@ async fn on_ready( let message = CreateMessage::new(); let ready_embed = CreateEmbed::new() - .color(EMBED_COLOR) + .color(utils::EMBED_COLOR) .thumbnail(ready.user.avatar_url().unwrap_or_default()) - .author(CreateEmbedAuthor::new(format!("{} ({}) is ready!", ready.user.name, &**utils::BOT_VERSION)).clone()); + .author(CreateEmbedAuthor::new(format!("{} is ready!", ready.user.name)).clone()); serenity::ChannelId::new(BOT_READY_NOTIFY).send_message(&ctx.http, message.add_embed(ready_embed)).await?; diff --git a/src/utils.rs b/src/utils.rs index 5157fd5..ddcb951 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,5 +1,7 @@ use once_cell::sync::Lazy; +pub static EMBED_COLOR: i32 = 0x5a99c7; + pub static BOT_VERSION: Lazy = Lazy::new(|| { let cargo_version = cargo_toml::Manifest::from_path("Cargo.toml").unwrap().package.unwrap().version.unwrap(); format!("v{}", cargo_version)