Skip to content

Commit

Permalink
don't check audit log if fetching it fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishjh-bst committed Jun 29, 2024
1 parent 5b6fcc0 commit 9e59a6d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions moderation/punishments.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ func punish(config *Config, p Punishment, guildID int64, channel *dstate.Channel
auditLog, err := common.BotSession.GuildAuditLog(gs.ID, common.BotUser.ID, 0, auditLogType, 10)
if err != nil {
logger.WithError(err).WithField("guild", gs.ID).Error("Failed retrieving audit log")
return err
}
for _, v := range auditLog.Users {
if v.ID == user.ID {
Expand Down

0 comments on commit 9e59a6d

Please sign in to comment.