UsersAPI
No summary provided.
constructor(rest)
Constructs a new instance of the
UsersAPI class| Name | Type | Optional | Description |
|---|---|---|---|
| rest | REST | No | None |
Opens a new DM channel with a user
| Name | Type | Optional | Description |
|---|---|---|---|
| userId | Snowflake | No | The id of the user to open a DM channel with |
Edits the current user
| Name | Type | Optional | Description |
|---|---|---|---|
| user | RESTPatchAPICurrentUserJSONBody | No | The new data for the current user |
Edits the guild member for the current user
| Name | Type | Optional | Description |
|---|---|---|---|
| guildId | Snowflake | No | The id of the guild |
| member | RESTPatchAPIGuildMemberJSONBody | Yes | The new data for the guild member |
| reason | string | Yes | The reason for editing this guild member |
Fetches a user by their id
| Name | Type | Optional | Description |
|---|---|---|---|
| userId | Snowflake | No | The id of the user to fetch |
Returns the user object of the requester's account
Fetches the guild member for the current user
| Name | Type | Optional | Description |
|---|---|---|---|
| guildId | Snowflake | No | The id of the guild |
Returns a list of partial guild objects the current user is a member of
| Name | Type | Optional | Description |
|---|---|---|---|
| options | RESTGetAPICurrentUserGuildsQuery | Yes | The options to use when fetching the current user's guilds |
Leaves the guild with the given id
| Name | Type | Optional | Description |
|---|---|---|---|
| guildId | Snowflake | No | The id of the guild |
Sets the voice state for the current user
| Name | Type | Optional | Description |
|---|---|---|---|
| guildId | Snowflake | No | The id of the guild |
| options | RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody | Yes | The options to use when setting the voice state |