mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-27 09:12:53 +00:00
api: allow searching DMs
This commit is contained in:
parent
0ec9fe5ace
commit
231b4759dc
|
@ -35,3 +35,15 @@ func (c *Client) Search(guildID discord.GuildID, data SearchData) (SearchRespons
|
||||||
httputil.WithSchema(c, data),
|
httputil.WithSchema(c, data),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SearchDirectMessages searches through a direct message channel.
|
||||||
|
// SearchData.ChannelID must be a valid channel ID.
|
||||||
|
func (c *Client) SearchDirectMessages(data SearchData) (SearchResponse, error) {
|
||||||
|
var resp SearchResponse
|
||||||
|
|
||||||
|
return resp, c.RequestJSON(
|
||||||
|
&resp, "GET",
|
||||||
|
EndpointChannels+data.ChannelID.String()+"/messages/search",
|
||||||
|
httputil.WithSchema(c, data),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue