Skip to content

Commit

Permalink
remove unneeded UnmarshalChannel for threads in audit log
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Sep 7, 2022
1 parent 31933fc commit 37d3de2
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions discord/audit_log.go
Expand Up @@ -132,7 +132,6 @@ func (l *AuditLog) UnmarshalJSON(data []byte) error {
var v struct {
ApplicationCommands []UnmarshalApplicationCommand `json:"application_commands"`
Integrations []UnmarshalIntegration `json:"integrations"`
Threads []UnmarshalChannel `json:"threads"`
Webhooks []UnmarshalWebhook `json:"webhooks"`
auditLog
}
Expand All @@ -155,13 +154,6 @@ func (l *AuditLog) UnmarshalJSON(data []byte) error {
}
}

if v.Threads != nil {
l.Threads = make([]GuildThread, len(v.Threads))
for i := range v.Threads {
l.Threads[i] = v.Threads[i].Channel.(GuildThread)
}
}

if v.Webhooks != nil {
l.Webhooks = make([]Webhook, len(v.Webhooks))
for i := range v.Webhooks {
Expand Down

0 comments on commit 37d3de2

Please sign in to comment.