Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for integration events #1545

Merged
merged 6 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions eventhandlers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,21 @@ type GuildScheduledEventUserRemove struct {
GuildID string `json:"guild_id"`
}

// IntegrationCreate is the data for a IntegrationCreate event.
type IntegrationCreate struct {
*Integration
Suhaibinator marked this conversation as resolved.
Show resolved Hide resolved
}

// IntegrationUpdate is the data for a IntegrationUpdate event.
type IntegrationUpdate struct {
*Integration
Suhaibinator marked this conversation as resolved.
Show resolved Hide resolved
}

// IntegrationDelete is the data for a IntegrationDelete event.
type IntegrationDelete struct {
*Integration
Suhaibinator marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The payload isn't an Integration object. Rather it's

Suggested change
*Integration
ID string `json:"id"`
GuildID string `json:"guild_id"`
ApplicationID string `json:"application_id,omitempty"`

P.S. This is unformatted.

}

// MessageCreate is the data for a MessageCreate event.
type MessageCreate struct {
*Message
Expand Down