Sunan Ibn Majah, Book 33, Hadith 97 (Ibn Majah 3755)

It was narrated from Amr bin Shuaib, from his father, from his grandfather, that the Messenger of Allah(ﷺ) said:

"No one tells the stories to the people (for the purpose of exhortation) except a ruler, one appointed by a ruler, or a show-off."