Options
All
  • Public
  • Public/Protected
  • All
Menu

Class User

Hierarchy

Index

Constructors

Properties

client: Client

The client that instantiated this structure

data: APIUser

Raw User data

Accessors

  • get accentColor(): undefined | null | number
  • The base 10 accent color of the user's banner

    Returns undefined | null | number

  • get avatar(): null | string
  • The user avatar's hash

    Returns null | string

  • get banner(): undefined | null | string
  • The user banner's hash

    Returns undefined | null | string

  • get bot(): boolean
  • Whether or not the user is a bot

    Returns boolean

  • get createdAt(): Date
  • The time the user was created at

    Returns Date

  • get createdTimestamp(): number
  • The timestamp the user was created at

    Returns number

  • get discriminator(): string
  • The discriminator of the user

    Returns string

  • get dmChannel(): undefined | Channel
  • The DMChannel between the client's user and this user

    Returns undefined | Channel

  • get id(): string
  • The user's Id

    Returns string

  • get system(): undefined | boolean
  • Whether the user is an Official Discord System user (part of the urgent message system)

    Returns undefined | boolean

  • get tag(): null | string
  • The Discord "tag" (e.g. Veric#2755) for this user

    Returns null | string

  • get username(): string
  • The username of the user

    Returns string

  • get verified(): undefined | boolean
  • Whether or not the user is verified

    Returns undefined | boolean

Methods

  • A link to the user's avatar

    Parameters

    Returns null | string

  • A link to the user's banner

    Parameters

    Returns null | string

  • clone(): any
  • Returns any

  • Creates a DMChannel between the client and a user

    Returns Channel | Promise<Channel>

  • A link to the user's avatar if they have one. Otherwise a link to their default avatar will be returned

    Parameters

    Returns null | string

  • fetch(): Promise<User>
  • Fetches this user

    Returns Promise<User>

  • Parameters

    Returns User

  • Sends a message to this user

    example
    const { Embed } = require('helly');
    const embed = new Embed().setTitle('Pong!')
    user.send({ embeds: [embed] })
    example
    const { Embed } = require('helly');
    const embed = new Embed().setTitle('Pong!')
    user.send({ content: 'Ping?', embeds: [embed] })
    example
    user.send('Hello world!')
    

    Parameters

    Returns Promise<Message>

  • toString(): string
  • Returns the mention of the user

    Returns string

Generated using TypeDoc version 0.22.16, the 9/16/2022 at 1:09:15 AM