Skip to content

Commit

Permalink
Implement Audit Log Entry Create event (#1314)
Browse files Browse the repository at this point in the history
* Implement GUILD_AUDIT_LOG_ENTRY_CREATE event.
* Rename IntentGuildBans constant to IntentGuildModeration to match API documentation.
  • Loading branch information
FedorLap2006 committed Apr 7, 2023
1 parent b7c431c commit 6958472
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
24 changes: 24 additions & 0 deletions eventhandlers.go

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

5 changes: 5 additions & 0 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,3 +401,8 @@ type AutoModerationActionExecution struct {
MatchedKeyword string `json:"matched_keyword"`
MatchedContent string `json:"matched_content"`
}

// GuildAuditLogEntryCreate is the data for a GuildAuditLogEntryCreate event.
type GuildAuditLogEntryCreate struct {
*AuditLogEntry
}
4 changes: 3 additions & 1 deletion structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2351,7 +2351,7 @@ type Intent int
const (
IntentGuilds Intent = 1 << 0
IntentGuildMembers Intent = 1 << 1
IntentGuildBans Intent = 1 << 2
IntentGuildModeration Intent = 1 << 2
IntentGuildEmojis Intent = 1 << 3
IntentGuildIntegrations Intent = 1 << 4
IntentGuildWebhooks Intent = 1 << 5
Expand All @@ -2371,6 +2371,8 @@ const (

// TODO: remove when compatibility is not needed

IntentGuildBans Intent = IntentGuildModeration

IntentsGuilds Intent = 1 << 0
IntentsGuildMembers Intent = 1 << 1
IntentsGuildBans Intent = 1 << 2
Expand Down

0 comments on commit 6958472

Please sign in to comment.