Skip to content

Commit

Permalink
Fix auditing
Browse files Browse the repository at this point in the history
  • Loading branch information
robrotheram committed Jan 2, 2024
1 parent 396b890 commit 74cfaea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pkg/controllers/auditing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pkg/discord/commands/playCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 74cfaea

Please sign in to comment.