mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-12-01 03:03:48 +00:00
API: Added SetNote for user accounts
This commit is contained in:
parent
91e494ba51
commit
712a061e8e
15
api/user.go
15
api/user.go
|
@ -85,3 +85,18 @@ func (c *Client) UserConnections() ([]discord.Connection, error) {
|
||||||
var conn []discord.Connection
|
var conn []discord.Connection
|
||||||
return conn, c.RequestJSON(&conn, "GET", EndpointMe+"/connections")
|
return conn, c.RequestJSON(&conn, "GET", EndpointMe+"/connections")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetNote sets a note for the user. This endpoint is undocumented and might
|
||||||
|
// only work for user accounts.
|
||||||
|
func (c *Client) SetNote(userID discord.Snowflake, note string) error {
|
||||||
|
var body = struct {
|
||||||
|
Note string `json:"note"`
|
||||||
|
}{
|
||||||
|
Note: note,
|
||||||
|
}
|
||||||
|
|
||||||
|
return c.FastRequest(
|
||||||
|
"PUT", EndpointMe+"/notes/"+userID.String(),
|
||||||
|
httputil.WithJSONBody(body),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue