Class UserManager

Manages iFunny Users

Hierarchy

Constructors

Properties

#cache: Cache<typeof User>

The cache of items for this manager

#holds: typeof User

The data structure belonging to this manager

client: Client<boolean>

The client this manager is attached to

Accessors

Methods

  • Fetches a user by their ID or Nick

    Returns

    User|null if the client is authorized

    Throws

    iFunnyError

    Parameters

    • idOrNick: string

      Id or nick of the user

    • byNick: boolean = false

      Whether to lookup by nick (Default: false)

    • cached: boolean = true

      Whater to return the cached result (Default: true)

    Returns Promise<null | User>

  • Checks if an email is available or if it's taken by another user
    It's a good idea to check this before signing up or changing your email

    Parameters

    • email: string

      Email to check availability of

    Returns Promise<boolean>

  • Checks if a nick is available or if it's taken by another user
    It's a good idea to check this before signing up or changing your nick

    Parameters

    • nick: string

      Nick to check availability of

    Returns Promise<boolean>

Generated using TypeDoc