Skip to content

Commit

Permalink
revert audit log changes
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Sep 7, 2022
1 parent 35e4cf6 commit 2cee41a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion discord/audit_log.go
Expand Up @@ -117,8 +117,8 @@ const (

// AuditLog (https://discord.com/developers/docs/resources/audit-log) These are logs of events that occurred, accessible via the Discord
type AuditLog struct {
Entries []AuditLogEntry `json:"audit_log_entries"`
ApplicationCommands []ApplicationCommand `json:"application_commands"`
AuditLogEntries []AuditLogEntry `json:"audit_log_entries"`
AutoModerationRules []AutoModerationRule `json:"auto_moderation_rules"`
GuildScheduledEvents []GuildScheduledEvent `json:"guild_scheduled_events"`
Integrations []Integration `json:"integrations"`
Expand Down
6 changes: 3 additions & 3 deletions rest/page.go
Expand Up @@ -65,12 +65,12 @@ func (p *AuditLogPage) Previous() bool {
return false
}

if len(p.Entries) > 0 {
p.ID = p.Entries[len(p.Entries)-1].ID
if len(p.AuditLogEntries) > 0 {
p.ID = p.AuditLogEntries[len(p.AuditLogEntries)-1].ID
}

p.AuditLog, p.Err = p.getItems(p.ID)
if p.Err == nil && len(p.Entries) == 0 {
if p.Err == nil && len(p.AuditLogEntries) == 0 {
p.Err = ErrNoMorePages
}
return p.Err == nil
Expand Down

0 comments on commit 2cee41a

Please sign in to comment.