diff --git a/examples/threads/main.go b/examples/threads/main.go index 9b6179184..5ea5f8c9c 100644 --- a/examples/threads/main.go +++ b/examples/threads/main.go @@ -48,9 +48,11 @@ func main() { games[m.ChannelID] = time.Now() <-time.After(timeout) if time.Since(games[m.ChannelID]) >= timeout { + archived := true + locked := true _, err := s.ChannelEditComplex(m.ChannelID, &discordgo.ChannelEdit{ - Archived: true, - Locked: true, + Archived: &archived, + Locked: &locked, }) if err != nil { panic(err) diff --git a/structs.go b/structs.go index 0b6b6a675..958fb0d4d 100644 --- a/structs.go +++ b/structs.go @@ -360,7 +360,7 @@ func (c *Channel) IsThread() bool { type ChannelEdit struct { Name string `json:"name,omitempty"` Topic string `json:"topic,omitempty"` - NSFW bool `json:"nsfw,omitempty"` + NSFW *bool `json:"nsfw,omitempty"` Position int `json:"position"` Bitrate int `json:"bitrate,omitempty"` UserLimit int `json:"user_limit,omitempty"` @@ -370,10 +370,10 @@ type ChannelEdit struct { // NOTE: threads only - Archived bool `json:"archived,omitempty"` - AutoArchiveDuration int `json:"auto_archive_duration,omitempty"` - Locked bool `json:"locked,bool"` - Invitable bool `json:"invitable,omitempty"` + Archived *bool `json:"archived,omitempty"` + AutoArchiveDuration int `json:"auto_archive_duration,omitempty"` + Locked *bool `json:"locked,omitempty"` + Invitable *bool `json:"invitable,omitempty"` } // A ChannelFollow holds data returned after following a news channel