From 9e59a6dc79554dde913d32bc66555b9e8a002b6f Mon Sep 17 00:00:00 2001 From: Ashish Jhanwar Date: Sat, 29 Jun 2024 14:23:17 +0530 Subject: [PATCH] don't check audit log if fetching it fails --- moderation/punishments.go | 1 + 1 file changed, 1 insertion(+) diff --git a/moderation/punishments.go b/moderation/punishments.go index cdf331715a..8d72cc8c92 100644 --- a/moderation/punishments.go +++ b/moderation/punishments.go @@ -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 {