APIUser

https://discord.com/developers/docs/resources/user#user-object

Signature

export interface APIUser

Properties

username: string;

The user's username, not unique across the platform

global_name: string | null;

The user's display name, if it is set. For bots, this is the application name

avatar: string | null;

The user's avatar hash See https://discord.com/developers/docs/reference#image-formatting

bot?: boolean;

Whether the user belongs to an OAuth2 application

system?: boolean;

Whether the user is an Official Discord System user (part of the urgent message system)

mfa_enabled?: boolean;

Whether the user has two factor enabled on their account

banner?: string | null;

The user's banner hash See https://discord.com/developers/docs/reference#image-formatting

accent_color?: number | null;

The user's banner color encoded as an integer representation of hexadecimal color code

locale?: string;

The user's chosen language option

verified?: boolean;

Whether the email on this account has been verified

email?: string | null;

The user's email

flags?: UserFlags;

The flags on a user's account See https://discord.com/developers/docs/resources/user#user-object-user-flags

premium_type?: UserPremiumType;

The type of Nitro subscription on a user's account See https://discord.com/developers/docs/resources/user#user-object-premium-types

public_flags?: UserFlags;

The public flags on a user's account See https://discord.com/developers/docs/resources/user#user-object-user-flags

collectibles?: APICollectibles | null;

The data for the user's collectibles See https://discord.com/developers/docs/resources/user#collectibles

primary_guild?: APIUserPrimaryGuild | null;

The user's primary guild See https://discord.com/developers/docs/resources/user#user-object-user-primary-guild