Skip to content

Commit

Permalink
fix: quick fix for member object not fetching from cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
myrkvi committed Oct 2, 2024
1 parent a3298c3 commit 83837c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions listeners/joinleave.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/cbroglie/mustache"
"github.com/disgoorg/disgo/discord"
"github.com/disgoorg/disgo/events"

"github.com/myrkvi/heimdallr/model"
"github.com/myrkvi/heimdallr/utils"
)
Expand Down Expand Up @@ -79,6 +80,7 @@ func OnUserLeave(e *events.GuildMemberLeave) {
return
}

e.Member.User = e.User
joinleaveInfo := utils.NewMessageTemplateData(e.Member, guild.Guild)

contents, err := mustache.RenderRaw(guildSettings.LeaveMessage, true, joinleaveInfo)
Expand Down

0 comments on commit 83837c9

Please sign in to comment.