Interface SelfUser

    • Method Detail

      • isVerified

        boolean isVerified()
        The status of this account's verification. (Have you accepted the verification email)
        Returns:
        True, if this account is verified.
      • isMfaEnabled

        boolean isMfaEnabled()
        If true, this account is protected by Multi-Factor authorization.
        If this is a Client account, then this describes the MFA status of the Client account.
        If this is a Bot account, then this describes the MFA status of the Client account that owns this Bot.
        Returns:
        True, if this account has MFA protecting it.
      • isMobile

        boolean isMobile()
        Shows whether there has ever been a mobile app connected to this account.
        NOTE: this is a AccountType.CLIENT method only!
        Returns:
        true if the account is linked with a mobile app, otherwise false
        Throws:
        AccountTypeException - If this method is called when JDA#getAccountType() does not return AccountType.CLIENT. E.g: If the logged in account isn't a Client account!
      • getPhoneNumber

        @Nullable
        String getPhoneNumber()
        Used to get the phone number of the currently logged in account if a phone number has been attached to it.
        NOTE: this is a AccountType.CLIENT method only!
        Returns:
        The phone of the currently logged in account or null if there's no number associated
        Throws:
        AccountTypeException - If this method is called when JDA#getAccountType() does not return AccountType.CLIENT. E.g: If the logged in account isn't a Client account!
      • getAllowedFileSize

        long getAllowedFileSize()
        Returns the maximum size for files that can be uploaded with this account.
        Returns 8388608 for bots and non-nitro client accounts and 52428800 for client accounts with a active nitro subscription.
        Returns:
        The maximum size for files that can be uploaded with this account
        See Also:
        Message.MAX_FILE_SIZE, Message.MAX_FILE_SIZE_NITRO
      • getManager

        @Nonnull
        AccountManager getManager()
        The AccountManager for the currently logged in account.
        This can be used to atomically set account fields (like avatar/username) You modify multiple fields in one request by chaining setters before calling RestAction.queue().
        Returns:
        An AccountManager instance for the current account