Moses is told to bring Joshua so that God will inaugurate him to take over from Moses.
Deutoronomy 31:14 NKJV
14 Then the LORD said to Moses, “Behold, the days approach when you must die; call Joshua, and present yourselves in the tabernacle of meeting, that I may inaugurate him.” So Moses and Joshua went and presented themselves in the tabernacle of meeting.
The words spoken during the inauguration are ambiguous in the sense that its not clear who actually spoke to Joshua.
Deutoronomy 31:22-23 NKJV
22 Therefore Moses wrote this song the same day, and taught it to the children of Israel. 23 Then He inaugurated Joshua the son of Nun, and said, “Be strong and of good courage; for you shall bring the children of Israel into the land of which I swore to them, and I will be with you.”
The antecedent of "he" in the above text is Moses but the words spoken can only be attributed to the Lord
Is it Moses or the Lord who spoke to Joshua here?