Reuse the embed color in multiple files.
This commit is contained in:
parent
6955049dc0
commit
0b70affb92
@ -30,7 +30,7 @@ pub async fn data(
|
|||||||
|
|
||||||
ctx.send(|m| {
|
ctx.send(|m| {
|
||||||
m.embed(|e| {
|
m.embed(|e| {
|
||||||
e.color(0xf1d63c)
|
e.color(crate::COLOR)
|
||||||
.author(|a| {
|
.author(|a| {
|
||||||
a.name(format!("{}/{}", slot_cur, slot_cap))
|
a.name(format!("{}/{}", slot_cur, slot_cap))
|
||||||
})
|
})
|
||||||
|
@ -4,6 +4,8 @@ use poise::serenity_prelude::{self as serenity};
|
|||||||
|
|
||||||
type Error = Box<dyn std::error::Error + Send + Sync>;
|
type Error = Box<dyn std::error::Error + Send + Sync>;
|
||||||
|
|
||||||
|
pub static COLOR: i32 = 0xf1d63c;
|
||||||
|
|
||||||
async fn on_ready(
|
async fn on_ready(
|
||||||
ctx: &serenity::Context,
|
ctx: &serenity::Context,
|
||||||
ready: &serenity::Ready,
|
ready: &serenity::Ready,
|
||||||
@ -13,7 +15,7 @@ async fn on_ready(
|
|||||||
|
|
||||||
serenity::ChannelId(865673694184996888).send_message(&ctx.http, |m| {
|
serenity::ChannelId(865673694184996888).send_message(&ctx.http, |m| {
|
||||||
m.embed(|e| {
|
m.embed(|e| {
|
||||||
e.color(0xf1d63c)
|
e.color(COLOR)
|
||||||
.thumbnail(ready.user.avatar_url().unwrap_or_default())
|
.thumbnail(ready.user.avatar_url().unwrap_or_default())
|
||||||
.author(|a| {
|
.author(|a| {
|
||||||
a.name(format!("{} is ready!", ready.user.name))
|
a.name(format!("{} is ready!", ready.user.name))
|
||||||
|
Loading…
Reference in New Issue
Block a user