I think I like the old ready notification
All checks were successful
Build and push container image / build (push) Successful in 10m50s
All checks were successful
Build and push container image / build (push) Successful in 10m50s
This commit is contained in:
parent
97100fb355
commit
8d439d9d54
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -833,7 +833,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kon"
|
name = "kon"
|
||||||
version = "0.1.19"
|
version = "0.1.20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo_toml",
|
"cargo_toml",
|
||||||
"gamedig",
|
"gamedig",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kon"
|
name = "kon"
|
||||||
version = "0.1.19"
|
version = "0.1.20"
|
||||||
rust-version = "1.74"
|
rust-version = "1.75"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
@ -27,6 +27,6 @@ opt-level = 0
|
|||||||
debug = true
|
debug = true
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
opt-level = 3
|
opt-level = 2
|
||||||
debug = false
|
debug = false
|
||||||
strip = true
|
strip = true
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
Error,
|
Error,
|
||||||
EMBED_COLOR,
|
utils::EMBED_COLOR,
|
||||||
models::gameservers::Gameservers
|
models::gameservers::Gameservers
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
Error,
|
Error,
|
||||||
EMBED_COLOR,
|
|
||||||
models::gameservers::Gameservers,
|
models::gameservers::Gameservers,
|
||||||
commands::gameserver::ac_server_name,
|
commands::gameserver::ac_server_name,
|
||||||
utils::BOT_VERSION
|
utils::BOT_VERSION,
|
||||||
|
utils::EMBED_COLOR
|
||||||
};
|
};
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
|
@ -22,7 +22,6 @@ use serenity::{
|
|||||||
|
|
||||||
type Error = Box<dyn error::Error + Send + Sync>;
|
type Error = Box<dyn error::Error + Send + Sync>;
|
||||||
|
|
||||||
pub static EMBED_COLOR: i32 = 0x5a99c7;
|
|
||||||
static BOT_READY_NOTIFY: u64 = 865673694184996888;
|
static BOT_READY_NOTIFY: u64 = 865673694184996888;
|
||||||
|
|
||||||
async fn on_ready(
|
async fn on_ready(
|
||||||
@ -34,9 +33,9 @@ async fn on_ready(
|
|||||||
|
|
||||||
let message = CreateMessage::new();
|
let message = CreateMessage::new();
|
||||||
let ready_embed = CreateEmbed::new()
|
let ready_embed = CreateEmbed::new()
|
||||||
.color(EMBED_COLOR)
|
.color(utils::EMBED_COLOR)
|
||||||
.thumbnail(ready.user.avatar_url().unwrap_or_default())
|
.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?;
|
serenity::ChannelId::new(BOT_READY_NOTIFY).send_message(&ctx.http, message.add_embed(ready_embed)).await?;
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
|
pub static EMBED_COLOR: i32 = 0x5a99c7;
|
||||||
|
|
||||||
pub static BOT_VERSION: Lazy<String> = Lazy::new(|| {
|
pub static BOT_VERSION: Lazy<String> = Lazy::new(|| {
|
||||||
let cargo_version = cargo_toml::Manifest::from_path("Cargo.toml").unwrap().package.unwrap().version.unwrap();
|
let cargo_version = cargo_toml::Manifest::from_path("Cargo.toml").unwrap().package.unwrap().version.unwrap();
|
||||||
format!("v{}", cargo_version)
|
format!("v{}", cargo_version)
|
||||||
|
Loading…
Reference in New Issue
Block a user