diff --git a/Cargo.lock b/Cargo.lock index 85bbbad..a785eb4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -822,7 +822,7 @@ dependencies = [ [[package]] name = "kon" -version = "0.1.7" +version = "0.1.8" dependencies = [ "cargo_toml", "gamedig", diff --git a/Cargo.toml b/Cargo.toml index 5629217..9179d34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kon" -version = "0.1.7" +version = "0.1.8" rust-version = "1.74" edition = "2021" diff --git a/src/commands/status.rs b/src/commands/status.rs index 1ebf174..6247670 100644 --- a/src/commands/status.rs +++ b/src/commands/status.rs @@ -1,4 +1,4 @@ -use crate::{Error, COLOR}; +use crate::{Error, EMBED_COLOR}; use gamedig::protocols::{ valve::{ @@ -82,7 +82,7 @@ pub async fn ats(ctx: poise::Context<'_, (), Error>) -> Result<(), Error> { match query_server() { Ok(response) => { ctx.send(|m| m.embed(|e| - e.color(COLOR) + e.color(EMBED_COLOR) .title("American Truck Simulator Server Status") .fields(vec![ ("Name", format!("{}", response.info.name), true), @@ -126,7 +126,7 @@ pub async fn wg(ctx: poise::Context<'_, (), Error>) -> Result<(), Error> { } ctx.send(|m| m.embed(|e| - e.color(COLOR) + e.color(EMBED_COLOR) .title("World of Tanks Server Status") .fields(embed_fields) )).await?; diff --git a/src/main.rs b/src/main.rs index 9b4e2c7..8e62366 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,8 @@ use std::env::var; type Error = Box; -pub static COLOR: i32 = 0x5a99c7; +pub static EMBED_COLOR: i32 = 0x5a99c7; +static BOT_READY_NOTIFY: u64 = 865673694184996888; async fn on_ready( ctx: &serenity::Context, @@ -14,8 +15,8 @@ async fn on_ready( ) -> Result<(), Error> { println!("Connected to API as {}", ready.user.name); - serenity::ChannelId(865673694184996888).send_message(&ctx.http, |m| m.embed(|e| - e.color(COLOR) + serenity::ChannelId(BOT_READY_NOTIFY).send_message(&ctx.http, |m| m.embed(|e| + e.color(EMBED_COLOR) .thumbnail(ready.user.avatar_url().unwrap_or_default()) .author(|a| a.name(format!("{} is ready!", ready.user.name))