api: *Client.ActiveThreads returns ActiveThreads struct (#270)

* v3: api: *Client.ActiveThreads returns ActiveThread struct

* Apply suggestions
This commit is contained in:
rigormorrtiss 2021-08-20 13:27:53 +04:00 committed by GitHub
parent 64bd519156
commit 1e9eb4a473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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")
}