We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a261442 commit 20c40f3Copy full SHA for 20c40f3
1 file changed
src/main.rs
@@ -35,6 +35,25 @@ async fn main() -> anyhow::Result<()> {
35
let framework = poise::Framework::builder()
36
.options(poise::FrameworkOptions {
37
commands: get_commands(),
38
+ post_command: |ctx| {
39
+ Box::pin(async move {
40
+ let author = ctx.author();
41
+ let guild = ctx.guild();
42
+ let cmd = ctx.command();
43
+
44
+ let user_info = format!("{}[{}]", author.name, author.id);
45
46
+ let guild_info = if let Some(guild) = guild {
47
+ format!("{}[{}]", guild.name, guild.id)
48
+ } else {
49
+ "Direct Messages".to_string()
50
+ };
51
52
+ let command_name = cmd.name.to_lowercase();
53
54
+ info!("{} @ {} {}", user_info, guild_info, command_name);
55
+ })
56
+ },
57
..Default::default()
58
})
59
.setup(|ctx, _ready, framework| {
0 commit comments