From 1e9eb4a47334536a30f4f2596b53057d07b121cb Mon Sep 17 00:00:00 2001 From: rigormorrtiss Date: Fri, 20 Aug 2021 13:27:53 +0400 Subject: [PATCH] api: *Client.ActiveThreads returns ActiveThreads struct (#270) * v3: api: *Client.ActiveThreads returns ActiveThread struct * Apply suggestions --- api/channel.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/channel.go b/api/channel.go index c83cd43..f3625f8 100644 --- a/api/channel.go +++ b/api/channel.go @@ -472,7 +472,7 @@ func (c *Client) ThreadMembers(threadID discord.ChannelID) ([]discord.ThreadMemb } // https://discord.com/developers/docs/resources/guild#list-active-threads-response-body -type ActiveThread struct { +type ActiveThreads struct { // Threads are the active threads, ordered by descending ID. Threads []discord.Channel `json:"threads"` // Members contains a thread member for each of the Threads the current @@ -482,8 +482,8 @@ type ActiveThread struct { // ActiveThreads returns all the active threads in the guild, including public // and private threads. -func (c *Client) ActiveThreads(guildID discord.GuildID) ([]ActiveThread, error) { - var t []ActiveThread +func (c *Client) ActiveThreads(guildID discord.GuildID) (*ActiveThreads, error) { + var t *ActiveThreads return t, c.RequestJSON(&t, "GET", EndpointGuilds+guildID.String()+"/threads/active") }