🀡🏼 Get_user

🀡🏼 Get_user

Added on version 23.1.0b14
get_user(self, user_id: str) -> GetPublicUserResponse:
Fetch a single user given its user_id. Args: user_id (str): The unique identifier for a user. Returns: GetPublicUserResponse: The public data of the user.
user_id: str username: str outfit: list[OutfitItem] bio: str joined_at: DateTime last_online_in: DateTime | None num_followers: int num_following: int num_friends: int active_room: Optional[ActiveRoomInfo] country_code: str crew: Optional[Crew] voice_enabled: bool discord_handle: str | None = None
User type attrubutes from GetPublicUserResponse

βš™οΈ Use cases

Let’s make a simple example where everytime an user joins the room, the bot will get an response from the Web API to get the user public data.
async def on_user_join(self, user: User) -> None: response = await self.webapi.get_user(user.id) print (response)
Response:
GetPublicUserResponse( user=User( user_id="6111e1fb22dcb50edf32e4a8", username="ItsVini", outfit=[ OutfitItem( item_id="body-flesh", name="", rarity="", active_palette=23, parts=[], colors=OutfitItemColors( dependent_colors=[], palettes=[], linked_colors="" ), ), OutfitItem( item_id="hat-n_SchoolContestGrab2021CILACLOPSear", name="Veteran Ears ", rarity="rare", active_palette=0, parts=[ ( "front-hat-n_SchoolContestGrab2021CILACLOPSear-HatMidLower.vec", "HatMidLower", ), ( "front-hat-n_SchoolContestGrab2021CILACLOPSear-HatUpper.vec", "HatUpper", ), ], colors=OutfitItemColors( dependent_colors=[ "['body', 2, 0]", "['body', 0, 1]", "['body', 3, 2]", "['body', 4, 3]", "['body', 5, 4]", "['body', 1, 5]", ], palettes=[ ["B37E78", "F4D5BF", "E6BBA8", "F1B2AA", "FCFCFC", "E9C4AB"] ], linked_colors="", ), ), OutfitItem( item_id="hat-n_countercultureudcachluophobiagrab2021drippingknifepiercing", name="Dripping Knife Piercing", rarity="rare", active_palette=0, parts=[ ( "front-hat-n_countercultureudcachluophobiagrab2021drippingknifepiercing-HatUpper.vec", "HatUpper", ) ], colors=OutfitItemColors( dependent_colors=[], palettes=[], linked_colors="" ), ), OutfitItem( item_id="tattoo-n_CodyMeiPunckGrab2021bandage", name="Punk Leg Bandages ", rarity="rare", active_palette=0, parts=[ ( "front-tattoo-n_CodyMeiPunckGrab2021bandage-TatLeftLowerLeg.vec", "TatLeftLowerLeg", ), ( "front-tattoo-n_CodyMeiPunckGrab2021bandage-TatLeftUpperLeg.vec", "TatLeftUpperLeg", ), ( "front-tattoo-n_CodyMeiPunckGrab2021bandage-TatRightLowerLeg.vec", "TatRightLowerLeg", ), ( "front-tattoo-n_CodyMeiPunckGrab2021bandage-TatRightUpperLeg.vec", "TatRightUpperLeg", ), ], colors=OutfitItemColors( dependent_colors=[], palettes=[], linked_colors="" ), ), OutfitItem( item_id="eyebrow-n_05", name="Sleek brows", rarity="common", active_palette=1, parts=[ ("front-eyebrow-n_05-LeftEyebrow.vec", "LeftEyebrow"), ("front-eyebrow-n_05-RightEyebrow.vec", "RightEyebrow"), ], colors=OutfitItemColors( dependent_colors=[], palettes=[], linked_colors="" ), ), OutfitItem( item_id="hat-n_bluecolorgothgrab2021changinghorns_1", name="Sky-Demon Horns", rarity="rare", active_palette=0, parts=[ ( "front-hat-n_bluecolorgothgrab2021changinghorns_1-HatUpper.vec", "HatUpper", ) ], colors=OutfitItemColors( dependent_colors=["['eye', 3, 0]"], palettes=[["3FA2FF"]], linked_colors="", ), ), OutfitItem( item_id="nose-n_filmnoirgrab2021nose", name="Classic Film Nose", rarity="rare", active_palette=0, parts=[("front-nose-n_filmnoirgrab2021nose-Nose.vec", "Nose")], colors=OutfitItemColors( dependent_colors=[ "['body', 2, 0]", "['body', 0, 1]", "['body', 3, 2]", "['body', 4, 3]", "['body', 5, 4]", "['body', 1, 5]", ], palettes=[ ["B37E78", "F4D5BF", "E6BBA8", "F1B2AA", "FCFCFC", "E9C4AB"] ], linked_colors="body", ), ), OutfitItem( item_id="shoes-n_gettoworkudctheme1rewards2022achluophobiasneaker", name="Comfy Mortician Sneakers", rarity="rare", active_palette=0, parts=[ ( "front-shoes-n_gettoworkudctheme1rewards2022achluophobiasneaker-LeftShoeTop.vec", "LeftShoeTop", ), ( "front-shoes-n_gettoworkudctheme1rewards2022achluophobiasneaker-RightShoeTop.vec", "RightShoeTop", ), ], colors=OutfitItemColors( dependent_colors=[], palettes=[], linked_colors="" ), ), OutfitItem( item_id="hair_front-n_heavengrab2021swepthair", name="Heaven-Swept Hair", rarity="epic", active_palette=22, parts=[ ( "front-hair_front-n_heavengrab2021swepthair-HairFront.vec", "HairFront", ) ], colors=OutfitItemColors( dependent_colors=[], palettes=[], linked_colors="hair_back" ), ), OutfitItem( item_id="hair_back-f_04", name="Quick Updo Back", rarity="common", active_palette=22, parts=[("front-hair_back-f_04-HairBack.vec", "HairBack")], colors=OutfitItemColors( dependent_colors=[], palettes=[], linked_colors="hair_front" ), ), OutfitItem( item_id="shirt-n_anniverpromohcctee", name="Creature Clubβ„’ Year One White Tee", rarity="epic", active_palette=0, parts=[ ("front-shirt-n_anniverpromohcctee-BagLower.vec", "BagLower"), ( "front-shirt-n_anniverpromohcctee-LeftUpperSleeve.vec", "LeftUpperSleeve", ), ( "front-shirt-n_anniverpromohcctee-RightUpperSleeve.vec", "RightUpperSleeve", ), ("front-shirt-n_anniverpromohcctee-ShirtBody.vec", "ShirtBody"), ], colors=OutfitItemColors( dependent_colors=[], palettes=[], linked_colors="" ), ), OutfitItem( item_id="eye-n_halloweenhelebration2020fierydarkeyes", name="Fiery Dark Eyes", rarity="epic", active_palette=9, parts=[ ( "front-eye-n_halloweenhelebration2020fierydarkeyes-LeftPupil.vec", "LeftPupil", ), ( "front-eye-n_halloweenhelebration2020fierydarkeyes-RightEye.vec", "RightEye", ), ( "front-eye-n_halloweenhelebration2020fierydarkeyes-RightLash.vec", "RightLash", ), ( "front-eye-n_halloweenhelebration2020fierydarkeyes-RightPupil.vec", "RightPupil", ), ( "front-eye-n_halloweenhelebration2020fierydarkeyes-LeftEye.vec", "LeftEye", ), ( "front-eye-n_halloweenhelebration2020fierydarkeyes-LeftLash.vec", "LeftLash", ), ], colors=OutfitItemColors( dependent_colors=[], palettes=[], linked_colors="" ), ), OutfitItem( item_id="pants-n_countercultureudcachluophobiagrab2021ripharempants", name="Ripped Harem Pants ", rarity="rare", active_palette=0, parts=[ ( "front-pants-n_countercultureudcachluophobiagrab2021ripharempants-CenterPants.vec", "CenterPants", ), ( "front-pants-n_countercultureudcachluophobiagrab2021ripharempants-LeftPants.vec", "LeftPants", ), ( "front-pants-n_countercultureudcachluophobiagrab2021ripharempants-RightPants.vec", "RightPants", ), ( "front-pants-n_countercultureudcachluophobiagrab2021ripharempants-SkirtLeftLower.vec", "SkirtLeftLower", ), ( "front-pants-n_countercultureudcachluophobiagrab2021ripharempants-SkirtRightLower.vec", "SkirtRightLower", ), ], colors=OutfitItemColors( dependent_colors=[], palettes=[], linked_colors="" ), ), OutfitItem( item_id="mouth-n_CozyFallRewards2021fishtreat", name="NomNom Taiyaki Mouth", rarity="rare", active_palette=1, parts=[ ( "front-mouth-n_CozyFallRewards2021fishtreat-AwkwardMouth.vec", "AwkwardMouth", ), ( "front-mouth-n_CozyFallRewards2021fishtreat-FullMouth.vec", "FullMouth", ), ( "front-mouth-n_CozyFallRewards2021fishtreat-HappyMouth.vec", "HappyMouth", ), ( "front-mouth-n_CozyFallRewards2021fishtreat-PlainMouth.vec", "PlainMouth", ), ( "front-mouth-n_CozyFallRewards2021fishtreat-SadMouth.vec", "SadMouth", ), ( "front-mouth-n_CozyFallRewards2021fishtreat-ScaredMouth.vec", "ScaredMouth", ), ( "front-mouth-n_CozyFallRewards2021fishtreat-SurprisedMouth.vec", "SurprisedMouth", ), ], colors=OutfitItemColors( dependent_colors=[], palettes=[], linked_colors="" ), ), OutfitItem( item_id="gloves-n_hodgepodgeflamefatalegrab2022flamehands", name="Toasty Touch", rarity="rare", active_palette=0, parts=[ ( "front-gloves-n_hodgepodgeflamefatalegrab2022flamehands-LeftGlove.vec", "LeftGlove", ), ( "front-gloves-n_hodgepodgeflamefatalegrab2022flamehands-RightGlove.vec", "RightGlove", ), ], colors=OutfitItemColors( dependent_colors=["['eye', 3, 0]"], palettes=[["3FA2FF"]], linked_colors="", ), ), OutfitItem( item_id="bag-n_hodgepodgeflamefatalegrab2022firetail", name="Firewhip Tail", rarity="rare", active_palette=0, parts=[ ( "front-bag-n_hodgepodgeflamefatalegrab2022firetail-BagLower.vec", "BagLower", ) ], colors=OutfitItemColors( dependent_colors=["['eye', 3, 0]"], palettes=[["3FA2FF"]], linked_colors="", ), ), OutfitItem( item_id="hat-n_hodgepodgeflamefatalegrab2022fireears", name="Sparking Ears", rarity="rare", active_palette=0, parts=[ ( "front-hat-n_hodgepodgeflamefatalegrab2022fireears-HatUpper.vec", "HatUpper", ) ], colors=OutfitItemColors( dependent_colors=["['eye', 3, 0]"], palettes=[["3FA2FF"]], linked_colors="", ), ), OutfitItem( item_id="handbag-n_magicalgirluserrewards2022fireswords", name="Firebite Invoked", rarity="epic", active_palette=0, parts=[ ( "front-handbag-n_magicalgirluserrewards2022fireswords-LeftItemLower.vec", "LeftItemLower", ), ( "front-handbag-n_magicalgirluserrewards2022fireswords-RightItemLower.vec", "RightItemLower", ), ( "front-handbag-n_magicalgirluserrewards2022fireswords-RightItemUpper.vec", "RightItemUpper", ), ], colors=OutfitItemColors( dependent_colors=[ "['body', 2, 0]", "['body', 0, 1]", "['body', 3, 2]", "['body', 4, 3]", "['body', 5, 4]", "['body', 1, 5]", ], palettes=[ ["B37E78", "F4D5BF", "E6BBA8", "F1B2AA", "FCFCFC", "E9C4AB"] ], linked_colors="", ), ), OutfitItem( item_id="bag-n_feb02wednesdayliveopsales2023seraphcoat", name="Seraph's Ascent", rarity="legendary", active_palette=0, parts=[ ( "front-bag-n_feb02wednesdayliveopsales2023seraphcoat-BagLower.vec", "BagLower", ), ( "front-bag-n_feb02wednesdayliveopsales2023seraphcoat-BagMaxUpper.vec", "BagMaxUpper", ), ], colors=OutfitItemColors( dependent_colors=["['eye', 3, 0]"], palettes=[["3FA2FF"]], linked_colors="", ), ), ], bio="πŸ‡§πŸ‡·\n21y\n@ClaraMatosβ™₯️", joined_at=DateTime(2021, 8, 10, 2, 18, 35, 769000, tzinfo=Timezone("+00:00")), last_online_in=DateTime( 2023, 7, 14, 2, 10, 5, 536865, tzinfo=Timezone("+00:00") ), num_followers=83, num_following=19, num_friends=6, active_room=ActiveRoomInfo( id="61186670bd5272731251a06f", display_name="Vini's Bedroom", code_name=None ), country_code="", crew=None, voice_enabled=True, ) )
Built with Potion.so