תֶאְׁו םָֹּ֠תֹֹ֠א אָָּ֑בָּצַל הֶֶּ֖טַמַל ףֶלֶָ֥א הֶֶׁ֛שֹמ םָָּ֥תֹא חַַ֨לְׁש
ִּ
יַו-פִַּ֨ינְׁחָָּ֜ס בֶן-אֶלְׁעָּזָָּ֤ר
הַכֹהֵן֙ לַצָּבָָּ֔א וּכְׁלֵָ֥י הַקֶֹׁ֛דֶש וַחֲצֹֹֽצְׁרָ֥ וֹת הַתְׁרוּעֶָּּ֖ה בְׁיָּדֹֽוֹ: (ל"א ו')
"And Moshe send them, thousand per tribe, to the army, them and Pinchas son of Elazar the priest, to the army, and the sacred utensils and the trumpets of blowing in his hand." (31:6)
The Ohr haChaim haKadosh z"l speaks here at length about the choice of Pinchus in particular to lead the war against Midyan. One point he mentions is how on the one hand Hashem wanted specifically Pinchas to lead the war, while on the other hand He did not want to "embarrass" Moshe Rabbeinu by telling him directly that he is not the one to lead the war (or Yehoshua). To this end, Hashem did not tell Moshe directly who to send, but rather left it in the hands of Moshe, and Moshe then understood by himself to send Pinchas.
One lesson we learn from here: Hashem does not speak to a person in a negative way! If you come out of any part of Torah or any life experience with negative feelings and negative emotions, know that it is not Hashem talking! Yeitzer hara! Hashem only speaks with positive messages, positive feelings, and positive emotions. Open up Shaar haBechina of Chovos haLevavos, and he will teach you how the entire creation is pure goodness with nothing to worry about whatsoever. He will teach you how Hashem and your entire existence is 100% good and positive!