Improve formatting
This commit is contained in:
parent
ce9201a710
commit
c5eb818a12
11
src/main.rs
11
src/main.rs
@ -14,13 +14,13 @@ async fn on_ready(
|
|||||||
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);
|
||||||
@ -57,8 +57,7 @@ async fn main() {
|
|||||||
commands::eval::eval(),
|
commands::eval::eval(),
|
||||||
commands::data::data()
|
commands::data::data()
|
||||||
],
|
],
|
||||||
pre_command: |ctx|
|
pre_command: |ctx| Box::pin(async move {
|
||||||
Box::pin(async move {
|
|
||||||
println!("{} ran /{}", ctx.author().name, ctx.command().name)
|
println!("{} ran /{}", ctx.author().name, ctx.command().name)
|
||||||
}),
|
}),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
Loading…
Reference in New Issue
Block a user