Skip to content

Commit

Permalink
remove member caching from typing & message reaction events
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Jun 26, 2023
1 parent f4a652f commit 3985414
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions handlers/message_reaction_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import (
func gatewayHandlerMessageReactionAdd(client bot.Client, sequenceNumber int, shardID int, event gateway.EventMessageReactionAdd) {
genericEvent := events.NewGenericEvent(client, sequenceNumber, shardID)

if event.Member != nil {
client.Caches().AddMember(*event.Member)
}

client.EventManager().DispatchEvent(&events.MessageReactionAdd{
GenericReaction: &events.GenericReaction{
GenericEvent: genericEvent,
Expand Down
2 changes: 0 additions & 2 deletions handlers/typing_start_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ func gatewayHandlerTypingStart(client bot.Client, sequenceNumber int, shardID in
var member discord.Member
if event.Member != nil {
member = *event.Member
client.Caches().AddMember(member)
}

client.EventManager().DispatchEvent(&events.GuildMemberTypingStart{
GenericEvent: events.NewGenericEvent(client, sequenceNumber, shardID),
ChannelID: event.ChannelID,
Expand Down

0 comments on commit 3985414

Please sign in to comment.