mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-10-01 06:48:51 +00:00
api: *Client.ActiveThreads returns ActiveThreads struct (#270)
* v3: api: *Client.ActiveThreads returns ActiveThread struct * Apply suggestions
This commit is contained in:
parent
64bd519156
commit
1e9eb4a473
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue