Skip to content

User

Extends

  • ObjectToLower<APIUser>.DiscordBase<APIUser>

Constructors

new User(client, data)

1
new User(client: UsingClient, data: APIUser): User

Parameters

ParameterTypeDescription
clientUsingClient-
dataAPIUserUnique ID of the object

Returns

User

Inherited from

ObjectToLower<APIUser>.constructor

Source

seyfert/src/structures/extra/DiscordBase.ts:7

Properties

PropertyModifierTypeInherited from
accentColorpublicundefined | null | numberObjectToLower.accentColor
avatarpublicnull | stringObjectToLower.avatar
avatarDecorationpublicundefined | null | stringObjectToLower.avatarDecoration
bannerpublicundefined | null | stringObjectToLower.banner
botpublicundefined | booleanObjectToLower.bot
clientreadonlyUsingClient-
discriminatorpublicstringObjectToLower.discriminator
emailpublicundefined | null | stringObjectToLower.email
flagspublicundefined | UserFlagsObjectToLower.flags
globalNamepublicnull | stringObjectToLower.globalName
idpublicstringObjectToLower.id
localepublicundefined | stringObjectToLower.locale
mfaEnabledpublicundefined | booleanObjectToLower.mfaEnabled
premiumTypepublicundefined | UserPremiumTypeObjectToLower.premiumType
publicFlagspublicundefined | UserFlagsObjectToLower.publicFlags
systempublicundefined | booleanObjectToLower.system
usernamepublicstringObjectToLower.username
verifiedpublicundefined | booleanObjectToLower.verified

Accessors

createdAt

1
get createdAt(): Date

createdAt gets the creation Date instace of the current object.

Returns

Date

Source

seyfert/src/structures/extra/DiscordBase.ts:27


createdTimestamp

1
get createdTimestamp(): number

Create a timestamp for the current object.

Returns

number

Source

seyfert/src/structures/extra/DiscordBase.ts:20


name

1
get name(): string

Returns

string

Source

seyfert/src/structures/User.ts:14


tag

1
get tag(): string

Returns

string

Source

seyfert/src/structures/User.ts:10

Methods

avatarDecorationURL()

1
avatarDecorationURL(options?: CDNUrlOptions): undefined | string

Parameters

ParameterType
options?CDNUrlOptions

Returns

undefined | string

Source

seyfert/src/structures/User.ts:43


avatarURL()

1
avatarURL(options?: CDNUrlOptions): string

Parameters

ParameterType
options?CDNUrlOptions

Returns

string

Source

seyfert/src/structures/User.ts:36


bannerURL()

1
bannerURL(options?: CDNUrlOptions): undefined | string

Parameters

ParameterType
options?CDNUrlOptions

Returns

undefined | string

Source

seyfert/src/structures/User.ts:48


dm()

1
dm(force: boolean): Promise<DMChannel>

Open a DM with the user

Parameters

ParameterTypeDefault value
forcebooleanfalse

Returns

Promise<DMChannel>

Source

seyfert/src/structures/User.ts:28


fetch()

1
fetch(force: boolean): Promise<User>

Fetch user

Parameters

ParameterTypeDefault value
forcebooleanfalse

Returns

Promise<User>

Source

seyfert/src/structures/User.ts:21


presence()

1
presence(): ReturnCache<undefined | Omit<GatewayPresenceUpdate, "user"> & Object & Object>

Returns

ReturnCache<undefined | Omit<GatewayPresenceUpdate, "user"> & Object & Object>

Source

seyfert/src/structures/User.ts:53


toString()

1
toString(): string

Returns

string

Source

seyfert/src/structures/User.ts:57


write()

1
write(body: Omit<RESTPostAPIChannelMessageJSONBody, "components" | "embeds" | "poll"> & SendResolverProps): Promise<Message>

Parameters

ParameterType
bodyOmit<RESTPostAPIChannelMessageJSONBody, "components" | "embeds" | "poll"> & SendResolverProps

Returns

Promise<Message>

Source

seyfert/src/structures/User.ts:32