From 74cfaea5b2c551eb96425338bbbd195f6a91c1f6 Mon Sep 17 00:00:00 2001 From: robrotheram Date: Tue, 2 Jan 2024 21:24:45 +0000 Subject: [PATCH] Fix auditing --- pkg/controllers/auditing.go | 5 +++++ pkg/discord/commands/playCmd.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/controllers/auditing.go b/pkg/controllers/auditing.go index 512f0ca..517957d 100644 --- a/pkg/controllers/auditing.go +++ b/pkg/controllers/auditing.go @@ -6,6 +6,11 @@ type Auditing struct { } func (a *Auditing) Send(event Event) { + + //Filter out update_duration is spam and not needed for the log + if event.Action.Type == UPDATE_DURATION { + return + } log.WithFields(log.Fields{ "user": event.Action.User, "action": event.Action.Type, diff --git a/pkg/discord/commands/playCmd.go b/pkg/discord/commands/playCmd.go index 1c26ddb..9527693 100644 --- a/pkg/discord/commands/playCmd.go +++ b/pkg/discord/commands/playCmd.go @@ -74,7 +74,7 @@ func addCmd(ctx CommandCtx) *discordgo.InteractionResponse { if err != nil { return ctx.Errorf("%s Is not a valid URL", ctx.Args[0]) } - err = ctx.Controller.Add(ctx.Args[0], "") + err = ctx.Controller.Add(ctx.Args[0], ctx.Member.User.Username) if err != nil { return ctx.Errorf("error: %v", err) }