users
caution
All props/parameters are optional unless they are marked with an asterisk ( * ).
Functions
Name | Parameters | Return Type | Description |
---|---|---|---|
filter | * callback : (user: User) => User | boolean sort : boolean | User[] | Filters all users |
findByTag | * username : string discriminator : string | User | undefined | Gets the user by its username and discriminator |
forEach | * callback : (user: User) => void | void | Runs a function on each user |
getCommunicationDisabledUserMap | Record<string, string> | Gets all guild member timeout (communication disabled) information | |
getCommunicationDisabledVersion | number | Gets the communication disabled version | |
getCurrentUser | User | Gets the current user | |
getMember | * guildId : string * userId : string | GuildMember | null | Gets the guild member by its id |
getMemberIds | guildId : string | string[] | Gets all guild member ids |
getMemberRoleWithPendingUpdates | * guildId : string * userId : string | string[] | Gets all pending role updates a guild member has |
getMembers | guildId : string | GuildMember[] | Gets all fetched members in a guild |
getMemberVersion | number | Gets the guild member store version | |
getMutableAllGuildsAndMembers | Record<string, Record<string, GuildMember>> | Gets all guilds and its fetched members | |
getNick | guildId : string userId : string | string | null | Gets the nickname a guild member has |
getNicknameGuildsMapping | * userId : string | Record<string, string[]> | Gets all nicknames a user has and in which guilds |
getNicknames | * userId : string | string[] | Gets all nicknames a user has |
getPendingRoleUpdates | * guildId : string | PendingRoleUpdate | Gets pending role updates of a guild |
getSelfMember | * guildId : string | GuildMember | null | Gets the guild member of the current user |
getTrueMember | * guildId : string * userId : string | GuildMember | null | Gets the guild member by its id |
getUser | * userId : string | User | undefined | Gets the user by its id |
getUsers | Record<string, User> | Gets all users | |
getUserStoreVersion | number | Gets the user store version | |
isCurrentUserGuest | guildId : string | boolean | Checks if the current user is a guest of a guild |
isGuestOrLurker | guildId : string userId : string | boolean | Checks if a user is a guest of a guild |
isMember | guildId : string userId : string | boolean | Checks if a user is a member of a guild |
memberOf | * userId : string | string[] | Gets all mutual servers of a user |
Types
PendingRoleUpdate
Name | Type | Description |
---|---|---|
added | Record<string, string[]> | Contains a list of members with added roles |
removed | Record<string, string[]> | Contains a list of members with removed roles |