Skip to content

Commit

Permalink
Add OnHeartbeatAck to ListenerAdapter
Browse files Browse the repository at this point in the history
Fixes #263
  • Loading branch information
sebm253 committed Apr 8, 2023
1 parent a3e65bd commit 250d1c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions events/listener_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ type ListenerAdapter struct {
// raw event
OnRaw func(event *Raw)

// heartbeat ack event
OnHeartbeatAck func(event *HeartbeatAck)

// GuildApplicationCommandPermissionsUpdate
OnGuildApplicationCommandPermissionsUpdate func(event *GuildApplicationCommandPermissionsUpdate)

Expand Down Expand Up @@ -175,6 +178,11 @@ func (l *ListenerAdapter) OnEvent(event bot.Event) {
listener(e)
}

case *HeartbeatAck:
if listener := l.OnHeartbeatAck; listener != nil {
listener(e)
}

case *GuildApplicationCommandPermissionsUpdate:
if listener := l.OnGuildApplicationCommandPermissionsUpdate; listener != nil {
listener(e)
Expand Down

0 comments on commit 250d1c9

Please sign in to comment.