Skip to main content
Module

x/biscuit/mod.ts>User

A Discord library that is easy to use but reliable on its core 🥠
Latest
class User
implements Model
Re-export
import { User } from "https://deno.land/x/biscuit@0.2.4/mod.ts";

Constructors

new
User(session: Session, data: DiscordUser)

Properties

optional
accentColor: number

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

optional
avatarHash: bigint

the user's avatar hash optimized as a bigint

optional
banner: bigint

the user's banner hash optimized as a bigint

bot: boolean

whether the user belongs to an OAuth2 application

discriminator: string

the user's 4-digit discord-tag

optional
email: string

the user's email

optional
flags: UserFlags

the flags on a user's account

readonly
id: Snowflake

the user's id

optional
locale: string

the user's chosen language option

mfaEnabled: boolean

whether the user has two factor enabled on their account

optional
premiumType: PremiumTypes

the type of Nitro subscription on a user's account

optional
publicFlags: UserFlags

the public flags on a user's account

readonly
session: Session

the session that instantiated this User

system: boolean

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

readonly
tag: string

gets the user's username#discriminator

username: string

the user's username, not unique across the platform

optional
verified: boolean

whether the email on this account has been verified

Methods

avatarURL(options: avatarOptions): string

gets the user's avatar

fetches this user

toString(): string