Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

House Speaker Paul Ryan opened his speech at the Al Smith Dinner in New York City with a joke about President Donald Trump.

"Please, enough. You sound like the Cabinet when Donald Trump walks into the room," he said as the audience applauded while he walked up to the podium, likely referring to the repeated occurrence of Cabinet officials' praising the president in front of television cameras.

Ryan, R-Wis., was the keynote speaker at the 72nd annual charity dinner for the Alfred E. Smith Foundation, which has close ties to the Catholic Archdiocese of New York. It's named for the Democrats' 1928 presidential nominee, the first Catholic nominated by a major party.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Ryan maintained the tradition of speeches that are traditionally roasts, mostly of high-profile politicians. And many of Ryan's jokes were directed at the president.

"Every morning, I wake up in my office and scroll Twitter to see which tweets I will have to pretend that I didn't see later," said Ryan, who is often asked what he thinks about Trump's controversial tweets. For months, he responded by saying he didn't respond to the president's tweets.

The white-tie affair gets its most attention in presidential election years, when the major-party nominees roast each other.

Last year's dinner was a rather tense affair, as Trump's comments were biting and he was mostly defensive. Ryan didn't let that night a year ago pass unremarked upon:

"I know last year at this dinner Donald Trump offended some people with his comments, which critics said went too far. Some said it was unbecoming of a public figure and that his comments were offensive. ... Well, thank God he's learned his lesson."

Related: How An Awkward Charity Dinner Summed Up the 2016 Campaign

Not all of Ryan's jokes targeted Trump. He didn't forget Democratic presidential candidate Hillary Clinton, Senate Democratic leader Chuck Schumer and the news media:

"I'm from Wisconsin. It's a great state to visit in the fall. Looking back, someone should have told Hillary Speaking of which, I got Hillary's new book. This sums up today's politics perfectly. She took eight months, writing 10 hours a day, to explain what happened in 512 pages. The president explained it in a tweet. Hash tag, I won."

"Everyone will report what happened here tonight differently. Breitbart will lead with 'Ryan slams the president amongst liberal elites.' The New York Times will report 'Ryan defends the President in a state Hillary won.' And the president will tweet, '300,000 at Al Smith dinner cheer mention of my name.'"

"Every afternoon, former Speaker John Boehner calls me up. Not to give advice. Just to laugh."

"I learned how to handle insults. Steve Bannon said I was born in a petri dish at the Heritage Foundation. This is amazing — no one knew Steve believed in science."

"I know why Chuck [Schumer] has been so hard on President Trump. It's not ideological. Chuck is just mad he lost his top donor."

Schumer was supposed to have been at the dinner, but he missed it because of the late-night votes during which the Senate passed a fiscal year 2018 budget bill.