pterodactyl.ts
    Preparing search index...

    Class User

    Implements

    • UserAttributes
    Index

    Constructors

    Properties

    admin: boolean
    email: string
    first_name: string
    id: number
    language: string
    last_name: string
    username: string

    Methods

    • Disable the mfs/2fa for this account

      Parameters

      • password: string

        The account password

      Returns Promise<void>

      Invalid password error

    • Enable the mfa/2fa for this account

      Parameters

      • code: number

        The 6 digit code generated from the mfs secret (via 'getMfaCredentials()')

      • password: string

        The account password

      Returns Promise<RecoveryTokensAttributes>

      Invalid code error

    • Get the users mfa/2fa credentials to generate the auth codes

      Returns Promise<{ image_url_data: string; secret: string }>

    • Update this accounts email address

      Parameters

      • email: string

        A valid new email address

      • password: string

        The account password

      Returns Promise<void>

      Invalid email and/or password error

    • Updates this accounts password

      Parameters

      • oldPassword: string

        The old password for this account

      • newPassword: string
      • OptionalrepeatPassword: string

      Returns Promise<void>