Improve formatting in main.rs
All checks were successful
Build and push container image / build (push) Successful in 6m42s

This commit is contained in:
toast 2023-12-08 22:44:27 +11:00
parent 7a5e9a6074
commit a7acb83c94

View File

@ -13,15 +13,13 @@ 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| { serenity::ChannelId(865673694184996888).send_message(&ctx.http, |m| m.embed(|e|
m.embed(|e|
e.color(COLOR) 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))
) )
) )).await?;
}).await?;
let register_commands = std::env::var("REGISTER_CMDS").unwrap_or_else(|_| String::from("true")).parse::<bool>().unwrap_or(true); let register_commands = std::env::var("REGISTER_CMDS").unwrap_or_else(|_| String::from("true")).parse::<bool>().unwrap_or(true);