UsersAPI

declare class UsersAPI
declare class UsersAPI

No summary provided.

constructor(rest)
Constructs a new instance of the UsersAPI class
NameTypeOptionalDescription
restRESTNoNone
Opens a new DM channel with a user
NameTypeOptionalDescription
userIdSnowflakeNoThe id of the user to open a DM channel with
Edits the current user
NameTypeOptionalDescription
userRESTPatchAPICurrentUserJSONBodyNoThe new data for the current user
editGuildMember(guildId, member?, reason?):Promise<discord_api_types_v10.APIGuildMember>
Edits the guild member for the current user
NameTypeOptionalDescription
guildIdSnowflakeNoThe id of the guild
memberRESTPatchAPIGuildMemberJSONBodyYesThe new data for the guild member
reasonstringYesThe reason for editing this guild member
Fetches a user by their id
NameTypeOptionalDescription
userIdSnowflakeNoThe id of the user to fetch
Returns the user object of the requester's account
Fetches the guild member for the current user
NameTypeOptionalDescription
guildIdSnowflakeNoThe id of the guild
Returns a list of partial guild objects the current user is a member of
NameTypeOptionalDescription
optionsRESTGetAPICurrentUserGuildsQueryYesThe options to use when fetching the current user's guilds
leaveGuild(guildId):Promise<void>
Leaves the guild with the given id
NameTypeOptionalDescription
guildIdSnowflakeNoThe id of the guild
setVoiceState(guildId, options?):Promise<never>
Sets the voice state for the current user
NameTypeOptionalDescription
guildIdSnowflakeNoThe id of the guild
optionsRESTPatchAPIGuildVoiceStateCurrentMemberJSONBodyYesThe options to use when setting the voice state