Log interaction's location
This commit is contained in:
parent
0588799d6e
commit
24943a34b0
@ -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