Compare commits
2 Commits
7cfeaa6bdc
...
24943a34b0
Author | SHA1 | Date | |
---|---|---|---|
24943a34b0 | |||
0588799d6e |
@ -1,6 +1,7 @@
|
||||
[package]
|
||||
name = "kon"
|
||||
version = "0.1.0"
|
||||
rust-version = "1.74"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@ -55,7 +55,11 @@ async fn main() {
|
||||
commands::status::status()
|
||||
],
|
||||
pre_command: |ctx| Box::pin(async move {
|
||||
println!("{} ran /{}", ctx.author().name, ctx.command().qualified_name)
|
||||
let get_guild_name = match ctx.guild() {
|
||||
Some(guild) => guild.name.clone(),
|
||||
None => String::from("DM")
|
||||
};
|
||||
println!("[{}] {} ran /{}", get_guild_name, ctx.author().name, ctx.command().qualified_name)
|
||||
}),
|
||||
..Default::default()
|
||||
}).setup(|ctx, ready, framework| Box::pin(on_ready(ctx, ready, framework)))
|
||||
|
Loading…
Reference in New Issue
Block a user