Update embed color and add constant for bot ready notification channel
This commit is contained in:
parent
b08a5c474a
commit
4b497658db
@ -37,7 +37,7 @@ pub async fn data(
|
|||||||
let minute = (daytime / 60 / 1000) % 60;
|
let minute = (daytime / 60 / 1000) % 60;
|
||||||
let time = format!("{:02}:{:02}", hour, minute);
|
let time = format!("{:02}:{:02}", hour, minute);
|
||||||
|
|
||||||
ctx.send(|m| m.embed(|e| e.color(crate::COLOR)
|
ctx.send(|m| m.embed(|e| e.color(crate::EMBED_COLOR)
|
||||||
.author(|a|
|
.author(|a|
|
||||||
a.name(format!("{}/{}", slot_cur, slot_cap))
|
a.name(format!("{}/{}", slot_cur, slot_cap))
|
||||||
)
|
)
|
||||||
|
@ -5,7 +5,8 @@ use std::env::var;
|
|||||||
|
|
||||||
type Error = Box<dyn std::error::Error + Send + Sync>;
|
type Error = Box<dyn std::error::Error + Send + Sync>;
|
||||||
|
|
||||||
pub static COLOR: i32 = 0xf1d63c;
|
pub static EMBED_COLOR: i32 = 0xf1d63c;
|
||||||
|
static BOT_READY_NOTIFY: u64 = 865673694184996888;
|
||||||
|
|
||||||
async fn on_ready(
|
async fn on_ready(
|
||||||
ctx: &serenity::Context,
|
ctx: &serenity::Context,
|
||||||
@ -14,8 +15,8 @@ async fn on_ready(
|
|||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
println!("Connected to API as {}", ready.user.name);
|
println!("Connected to API as {}", ready.user.name);
|
||||||
|
|
||||||
serenity::ChannelId(865673694184996888).send_message(&ctx.http, |m| m.embed(|e|
|
serenity::ChannelId(BOT_READY_NOTIFY).send_message(&ctx.http, |m| m.embed(|e|
|
||||||
e.color(COLOR)
|
e.color(EMBED_COLOR)
|
||||||
.thumbnail(ready.user.avatar_url().unwrap_or_default())
|
.thumbnail(ready.user.avatar_url().unwrap_or_default())
|
||||||
.author(|a| a.name(format!("{} is ready!", ready.user.name)))
|
.author(|a| a.name(format!("{} is ready!", ready.user.name)))
|
||||||
)).await?;
|
)).await?;
|
||||||
|
Loading…
Reference in New Issue
Block a user