Skip to content

Class: UserBase

structures/User.UserBase

Hierarchy

  • UserBase

GroupMember

PartialUser

GroupMember

PartialUser

Table of contents

Constructors

Properties

Methods

Constructors

constructor

+ new UserBase(data: UserBaseOptions, client: default): UserBase

Parameters:

Name Type
data UserBaseOptions
client default

Returns: UserBase

Defined in: structures/User.ts:72

Properties

client

client: default

Defined in: structures/User.ts:68


displayName

displayName: null | string

Defined in: structures/User.ts:71


id

id: number

Defined in: structures/User.ts:69


membership

membership: unknown

Defined in: structures/User.ts:72


name

name: null | string

Defined in: structures/User.ts:70

Methods

acceptFriendRequest

acceptFriendRequest(): Promise<unknown>

Returns: Promise<unknown>

Defined in: structures/User.ts:292


acceptJoinRequestInGroup

acceptJoinRequestInGroup(groupId: number): Promise<unknown>

Parameters:

Name Type
groupId number

Returns: Promise<unknown>

Defined in: structures/User.ts:359


addToChatConversation

addToChatConversation(conversationId: number): Promise<AddUsersToConversation>

Parameters:

Name Type
conversationId number

Returns: Promise<AddUsersToConversation>

Defined in: structures/User.ts:157


awardBadge

awardBadge(badgeId: number, placeId: number): Promise<string>

Parameters:

Name Type
badgeId number
placeId number

Returns: Promise<string>

Defined in: structures/User.ts:311


block

block(): Promise<boolean>

Returns: Promise<boolean>

Defined in: structures/User.ts:340


canInviteToVIPServer

canInviteToVIPServer(): Promise<boolean>

Returns: Promise<boolean>

Defined in: structures/User.ts:304


canManageAsset

canManageAsset(assetId: number): Promise<boolean>

Parameters:

Name Type
assetId number

Returns: Promise<boolean>

Defined in: structures/User.ts:352


declineFriendRequest

declineFriendRequest(): Promise<unknown>

Returns: Promise<unknown>

Defined in: structures/User.ts:298


declineJoinRequestInGroup

declineJoinRequestInGroup(groupId: number): Promise<unknown>

Parameters:

Name Type
groupId number

Returns: Promise<unknown>

Defined in: structures/User.ts:366


deleteBadge

deleteBadge(badgeId: number): Promise<unknown>

Parameters:

Name Type
badgeId number

Returns: Promise<unknown>

Defined in: structures/User.ts:129


deleteGroupWallPosts

deleteGroupWallPosts(groupId: number): Promise<unknown>

Parameters:

Name Type
groupId number

Returns: Promise<unknown>

Defined in: structures/User.ts:419


follow

follow(): Promise<FollowUser>

Returns: Promise<FollowUser>

Defined in: structures/User.ts:267


friend

friend(source?: string): Promise<SendFriendRequest>

Parameters:

Name Type
source? string

Returns: Promise<SendFriendRequest>

Defined in: structures/User.ts:273


getAvatar

getAvatar(): Promise<UserAvatar>

Returns: Promise<UserAvatar>

Defined in: structures/User.ts:89


getAvatarBustImage

getAvatarBustImage(options: Pick<GetUsersAvatarBustImagesOptions, size | format | isCircular>): Promise<{ imageUrl: string ; state: string ; targetId: number }>

Parameters:

Name Type
options Pick<GetUsersAvatarBustImagesOptions, size | format | isCircular>

Returns: Promise<{ imageUrl: string ; state: string ; targetId: number }>

Defined in: structures/User.ts:512


getAvatarHeadShotImage

getAvatarHeadShotImage(options: Pick<GetUsersAvatarHeadShotsImagesOptions, size | format | isCircular>): Promise<{ imageUrl: string ; state: string ; targetId: number }>

Parameters:

Name Type
options Pick<GetUsersAvatarHeadShotsImagesOptions, size | format | isCircular>

Returns: Promise<{ imageUrl: string ; state: string ; targetId: number }>

Defined in: structures/User.ts:520


getBadges

getBadges(options?: Pick<GetUserBadgesOptions, limit | cursor | sortOrder>): Promise<CursorPage<GameBadgeOptions>>

Parameters:

Name Type
options? Pick<GetUserBadgesOptions, limit | cursor | sortOrder>

Returns: Promise<CursorPage<GameBadgeOptions>>

Defined in: structures/User.ts:108


getBadgesAwardedDates

getBadgesAwardedDates(badges: number[]): Promise<{ awardedAt: Date ; id: number }[]>

Parameters:

Name Type
badges number[]

Returns: Promise<{ awardedAt: Date ; id: number }[]>

Defined in: structures/User.ts:118


getBundles

getBundles(options?: Pick<GetUserBundlesOptions, limit | cursor | sortOrder>): Promise<CursorPage<{ bundleType: string ; creator: { id: number ; name: string ; type: string } ; creatorType: number ; description: string ; id: number ; items: { id: number ; name: string ; owned: boolean ; type: string }[] ; name: string ; product: ProductDetails }>>

Parameters:

Name Type
options? Pick<GetUserBundlesOptions, limit | cursor | sortOrder>

Returns: Promise<CursorPage<{ bundleType: string ; creator: { id: number ; name: string ; type: string } ; creatorType: number ; description: string ; id: number ; items: { id: number ; name: string ; owned: boolean ; type: string }[] ; name: string ; product: ProductDetails }>>

Defined in: structures/User.ts:136


getBundlesByType

getBundlesByType(bundleType: string, options?: Pick<GetUserBundlesOptions, limit | cursor | sortOrder>): Promise<CursorPage<{ bundleType: string ; creator: { id: number ; name: string ; type: string } ; creatorType: number ; description: string ; id: number ; items: { id: number ; name: string ; owned: boolean ; type: string }[] ; name: string ; product: ProductDetails }>>

Parameters:

Name Type
bundleType string
options? Pick<GetUserBundlesOptions, limit | cursor | sortOrder>

Returns: Promise<CursorPage<{ bundleType: string ; creator: { id: number ; name: string ; type: string } ; creatorType: number ; description: string ; id: number ; items: { id: number ; name: string ; owned: boolean ; type: string }[] ; name: string ; product: ProductDetails }>>

Defined in: structures/User.ts:146


getCanTrade

getCanTrade(): Promise<boolean>

Returns: Promise<boolean>

Defined in: structures/User.ts:528


getCollectibles

getCollectibles(options?: Pick<GetUserCollectiblesOptions, limit | cursor | sortOrder | assetType>): Promise<CursorPage<{ assetId: number ; assetStock: number ; buildersClubMembershipType: string ; name: string ; originalPrice: number ; recentAveragePrice: number ; serialNumber: number ; userAssetId: number }>>

Parameters:

Name Type
options? Pick<GetUserCollectiblesOptions, limit | cursor | sortOrder | assetType>

Returns: Promise<CursorPage<{ assetId: number ; assetStock: number ; buildersClubMembershipType: string ; name: string ; originalPrice: number ; recentAveragePrice: number ; serialNumber: number ; userAssetId: number }>>

Defined in: structures/User.ts:432


getCurrentlyWearing

getCurrentlyWearing(): Promise<GetUserCurrentlyWearing>

Returns: Promise<GetUserCurrentlyWearing>

Defined in: structures/User.ts:95


getFollowers

getFollowers(options?: Pick<GetUserFollowersOptions, limit | cursor | sortOrder>): Promise<CursorPage<{ created: string ; description: string ; id: number ; isBanned: boolean ; isDeleted: boolean ; isOnline: boolean ; name: string }>>

Parameters:

Name Type
options? Pick<GetUserFollowersOptions, limit | cursor | sortOrder>

Returns: Promise<CursorPage<{ created: string ; description: string ; id: number ; isBanned: boolean ; isDeleted: boolean ; isOnline: boolean ; name: string }>>

Defined in: structures/User.ts:212


getFollowersCount

getFollowersCount(): Promise<number>

Returns: Promise<number>

Defined in: structures/User.ts:222


getFollowing

getFollowing(options?: Pick<GetUserFollowersOptions, limit | cursor | sortOrder>): Promise<CursorPage<{ created: string ; description: string ; id: number ; isBanned: boolean ; isDeleted: boolean ; isOnline: boolean ; name: string }>>

Parameters:

Name Type
options? Pick<GetUserFollowersOptions, limit | cursor | sortOrder>

Returns: Promise<CursorPage<{ created: string ; description: string ; id: number ; isBanned: boolean ; isDeleted: boolean ; isOnline: boolean ; name: string }>>

Defined in: structures/User.ts:229


getFollowingCount

getFollowingCount(): Promise<number>

Returns: Promise<number>

Defined in: structures/User.ts:239


getFriends

getFriends(): Promise<FriendRequest[]>

Returns: Promise<FriendRequest[]>

Defined in: structures/User.ts:246


getFriendsCount

getFriendsCount(): Promise<number>

Returns: Promise<number>

Defined in: structures/User.ts:253


getFriendsWithStatuses

getFriendsWithStatuses(userIds: number[]): Promise<GetUserFriendsWithStatuses>

Parameters:

Name Type
userIds number[]

Returns: Promise<GetUserFriendsWithStatuses>

Defined in: structures/User.ts:260


getFullBodyAvatarImage

getFullBodyAvatarImage(options: Pick<GetUsersFullBodyAvatarImagesOptions, size | format | isCircular>): Promise<{ imageUrl: string ; state: string ; targetId: number }>

Parameters:

Name Type
options Pick<GetUsersFullBodyAvatarImagesOptions, size | format | isCircular>

Returns: Promise<{ imageUrl: string ; state: string ; targetId: number }>

Defined in: structures/User.ts:504


getGroups

getGroups(): Promise<GetUserGroups>

Returns: Promise<GetUserGroups>

Defined in: structures/User.ts:327


getInventory

getInventory(options: Pick<GetUserInventoryOptions, limit | cursor | assetTypes | sortOrder>): Promise<CursorPage<{ assetId: number ; assetType: undefined | GamePass | Badge | Image | TShirt | Audio | Mesh | Lua | HTML | Text | Hat | Place | Model | Shirt | Pants | Decal | Avatar | Head | Face | Gear | GroupEmblem | Animation | Arms | Legs | Torso | RightArm | LeftArm | LeftLeg | RightLeg | Package | YouTubeVideo | App | Code | Plugin | SolidModel | MeshPart | HairAccessory | NeckAccessory | ShoulderAccessory | FrontAccessory | BackAccessory | WaistAccessory | ClimbAnimation | DeathAnimation | FallAnimation | IdleAnimation | JumpAnimation | RunAnimation | SwimAnimation | WalkAnimation | PoseAnimation | LocalizationTableManifest | LocalizationTableTranslation | EmoteAnimation | Video | TexturePack ; created: string ; name: string }>>

Parameters:

Name Type
options Pick<GetUserInventoryOptions, limit | cursor | assetTypes | sortOrder>

Returns: Promise<CursorPage<{ assetId: number ; assetType: undefined | GamePass | Badge | Image | TShirt | Audio | Mesh | Lua | HTML | Text | Hat | Place | Model | Shirt | Pants | Decal | Avatar | Head | Face | Gear | GroupEmblem | Animation | Arms | Legs | Torso | RightArm | LeftArm | LeftLeg | RightLeg | Package | YouTubeVideo | App | Code | Plugin | SolidModel | MeshPart | HairAccessory | NeckAccessory | ShoulderAccessory | FrontAccessory | BackAccessory | WaistAccessory | ClimbAnimation | DeathAnimation | FallAnimation | IdleAnimation | JumpAnimation | RunAnimation | SwimAnimation | WalkAnimation | PoseAnimation | LocalizationTableManifest | LocalizationTableTranslation | EmoteAnimation | Video | TexturePack ; created: string ; name: string }>>

Defined in: structures/User.ts:453


getInventoryByAssetTypeId

getInventoryByAssetTypeId(options: Pick<GetUserInventoryByAssetTypeIdOptions, limit | cursor | sortOrder | assetTypeId>): Promise<CursorPage<{ assetId: number ; assetName: string ; created: string ; owner: { buildersClubMembershipType: string ; userId: number ; username: string } ; serialNumber: number ; updated: string ; userAssetId: number }>>

Parameters:

Name Type
options Pick<GetUserInventoryByAssetTypeIdOptions, limit | cursor | sortOrder | assetTypeId>

Returns: Promise<CursorPage<{ assetId: number ; assetName: string ; created: string ; owner: { buildersClubMembershipType: string ; userId: number ; username: string } ; serialNumber: number ; updated: string ; userAssetId: number }>>

Defined in: structures/User.ts:463


getItemsByTypeAndTargetId

getItemsByTypeAndTargetId(itemType: Asset | GamePass | Badge | Bundle, id: number): Promise<CursorPage<{ Id: number ; InstanceId: number ; Name: string ; Type: Asset | GamePass | Badge | Bundle }>>

Parameters:

Name Type
itemType Asset | GamePass | Badge | Bundle
id number

Returns: Promise<CursorPage<{ Id: number ; InstanceId: number ; Name: string ; Type: Asset | GamePass | Badge | Bundle }>>

Defined in: structures/User.ts:442


getJoinRequestInGroup

getJoinRequestInGroup(groupId: number): Promise<{ created: string ; requester: { displayName: string ; userId: number ; username: string } }>

Parameters:

Name Type
groupId number

Returns: Promise<{ created: string ; requester: { displayName: string ; userId: number ; username: string } }>

Defined in: structures/User.ts:373


getOutfits

getOutfits(options: Pick<GetUserOutfitsOptions, isEditable | page | itemsPerPage>): Promise<GetUserOutfits>

Parameters:

Name Type
options Pick<GetUserOutfitsOptions, isEditable | page | itemsPerPage>

Returns: Promise<GetUserOutfits>

Defined in: structures/User.ts:101


getPremiumMembership

getPremiumMembership(): Promise<boolean>

Returns: Promise<boolean>

Defined in: structures/User.ts:477


getPresence

getPresence(): Promise<{ gameId: string ; lastLocation: string ; lastOnline: string ; placeId: number ; rootPlaceId: number ; universeId: number ; userId: number ; userPresenceType: EnumUserPresence }>

Returns: Promise<{ gameId: string ; lastLocation: string ; lastOnline: string ; placeId: number ; rootPlaceId: number ; universeId: number ; userId: number ; userPresenceType: EnumUserPresence }>

Defined in: structures/User.ts:490


getPrimaryGroup

getPrimaryGroup(): Promise<GetUserPrimaryGroup>

Returns: Promise<GetUserPrimaryGroup>

Defined in: structures/User.ts:426


getResellableAssetCopies

getResellableAssetCopies(assetId: number): Promise<GetUserResellableAssetCopies>

Parameters:

Name Type
assetId number

Returns: Promise<GetUserResellableAssetCopies>

Defined in: structures/User.ts:205


getStatus

getStatus(): Promise<string>

Returns: Promise<string>

Defined in: structures/User.ts:82


getTag

getTag(): Promise<{ targetUserId: number ; targetUserTag: string }>

Returns: Promise<{ targetUserId: number ; targetUserTag: string }>

Defined in: structures/User.ts:177


getUser

getUser(): Promise<User>

Returns: Promise<User>

Defined in: structures/User.ts:473


isFollowedByUser

isFollowedByUser(userId: number): Promise<boolean>

Parameters:

Name Type
userId number

Returns: Promise<boolean>

Defined in: structures/User.ts:320


kickFromGroup

kickFromGroup(groupId: number): Promise<unknown>

Parameters:

Name Type
groupId number

Returns: Promise<unknown>

Defined in: structures/User.ts:387


ownsAsset

ownsAsset(assetId: number): Promise<boolean>

Parameters:

Name Type
assetId number

Returns: Promise<boolean>

Defined in: structures/User.ts:333


payoutUserFromGroup

payoutUserFromGroup(options: { amount: number ; groupId: number ; type: string }): Promise<unknown>

Parameters:

Name Type
options object
options.amount number
options.groupId number
options.type string

Returns: Promise<unknown>

Defined in: structures/User.ts:402


removeFromConversation

removeFromConversation(conversationId: number): Promise<RemoveUserFromConversation>

Parameters:

Name Type
conversationId number

Returns: Promise<RemoveUserFromConversation>

Defined in: structures/User.ts:164


removeFromTeamCreate

removeFromTeamCreate(universeId: number): Promise<unknown>

Parameters:

Name Type
universeId number

Returns: Promise<unknown>

Defined in: structures/User.ts:198


sendMessage

sendMessage(options: Pick<SendMessageOptions, body | subject | recipientId | replyMessageId | includePreviousMessage>): Promise<SendMessage>

Parameters:

Name Type
options Pick<SendMessageOptions, body | subject | recipientId | replyMessageId | includePreviousMessage>

Returns: Promise<SendMessage>

Defined in: structures/User.ts:497


sendTrade

sendTrade(offers: Pick<{ robux: number ; userAssetIds: number[] ; userId: number }, userAssetIds | robux>[]): Promise<SendTrade>

Parameters:

Name Type
offers Pick<{ robux: number ; userAssetIds: number[] ; userId: number }, userAssetIds | robux>[]

Returns: Promise<SendTrade>

Defined in: structures/User.ts:535


setGroupOwner

setGroupOwner(groupId: number): Promise<unknown>

Parameters:

Name Type
groupId number

Returns: Promise<unknown>

Defined in: structures/User.ts:380


setPendingTag

setPendingTag(tag: string): Promise<SetPendingUserTag>

Parameters:

Name Type
tag string

Returns: Promise<SetPendingUserTag>

Defined in: structures/User.ts:184


setTag

setTag(tag: string): Promise<SetUserTag>

Parameters:

Name Type
tag string

Returns: Promise<SetUserTag>

Defined in: structures/User.ts:191


startConversation

startConversation(): Promise<StartCloudEditConversation>

Returns: Promise<StartCloudEditConversation>

Defined in: structures/User.ts:171


unFollow

unFollow(): Promise<FollowUser>

Returns: Promise<FollowUser>

Defined in: structures/User.ts:280


unblock

unblock(): Promise<boolean>

Returns: Promise<boolean>

Defined in: structures/User.ts:346


unfriend

unfriend(): Promise<unknown>

Returns: Promise<unknown>

Defined in: structures/User.ts:286


updateMemberInGroup

updateMemberInGroup(groupId: number, roleId: number): Promise<unknown>

Parameters:

Name Type
groupId number
roleId number

Returns: Promise<unknown>

Defined in: structures/User.ts:394


updateTranslationGameAccess

updateTranslationGameAccess(options: Pick<UpdateUserAccess, gameId | role | revoke>): Promise<unknown>

Parameters:

Name Type
options Pick<UpdateUserAccess, gameId | role | revoke>

Returns: Promise<unknown>

Defined in: structures/User.ts:545


upsellPremiumCheck

upsellPremiumCheck(options: Pick<PremiumUpsellCheckOptions, universeId | placeId>): Promise<unknown>

Parameters:

Name Type
options Pick<PremiumUpsellCheckOptions, universeId | placeId>

Returns: Promise<unknown>

Defined in: structures/User.ts:483