NEW YORK (AP) — Grammy-winning rapper Cardi B spoke to girls in a police mentorship program Friday as part of what she says has been an eye-opening and emotional week performing court-mandated community service for her role in a pair of brawls at New York City strip clubs in 2018.

The 30-year-old “Bodak Yellow” singer visited an NYPD “Girls Talk” event at the police training academy in Queens and shared what the department said was “her rags to riches story.” She danced with teens and posed for photos.

Cardi B’s plea deal requires her to perform 15 days of community service by March 1 to avoid a 15-day jail sentence.

“I feel like there’s so many people that make y’all probably feel like, ‘This is what’s cool, this is what’s going on, this is what it takes to be lit, this is what it takes to be fire,’” Cardi B told her young audience.

“Sometimes that’s a little bit of peer pressure like on a girl. Don’t fall into that. You know what I’m saying? Like, be great. Be you. You’re amazing. You’re dope yourself.”

The NYPD posted a video to Twitter showing highlights of the event.

That drew criticism from some people, including a retired police lieutenant, who questioned whether Cardi B was an appropriate role model for children given her sometimes provocative lyrics, criminal record and past admission that she drugged and robbed men while working as a stripper before she got famous.

Cardi B, a New York City native whose real name is Belcalis Almanzar, has been chronicling her community service on Twitter all week. On Saturday, she wrote: “Community service has been the best thing that has happened to me.”

She likened the experience to a spiritual journey that sometimes left her in tears. “Those people that we leave behind they just need somebody to talk and a lil push and YOU might be able to change their life forever,” she wrote.

In another post, on her way to the police academy, the multiple-platinum selling artist and mother of two complained about waking up early to perform community service before going to the recording studio, but added: “I did the crime ‘I only have myself to blame’.”

Cardi B agreed in September to a conditional discharge just as her case was about to go to trial. She pleaded guilty to two misdemeanor charges stemming from the August 2018 fights. Ten other counts, including two felonies, were dismissed. Two co-defendants also pleaded guilty.

In a statement at the time, Cardi B said: “Part of growing up and maturing is being accountable for your actions. As a mother, it’s a practice that I am trying to instill in my children, but the example starts with me. I’ve made some bad decisions in my past that I am not afraid to face and own up to. These moments don’t define me and they are not reflective of who I am now.”

According to prosecutors, Cardi B and her entourage were targeting employees of Angels Strip Club in Flushing, Queens, over an apparent personal dispute. In one fight, chairs, bottles and hookah pipes were thrown as the group argued with a bartender. She and another employee had minor injuries.

In 2019, Cardi B rejected a plea deal that would have given her a conditional discharge. Prosecutors then presented the case to a grand jury and obtained an indictment that included the two felony charges.

NYPD Chief of Training Juanita Holmes created the “Girls Talk” program to build trust and foster mentorships between police officers and girls, with occasional special guests. Ballet dancer Misty Copeland spoke to the group at police headquarters in December 2021.

Cardi B’s chart-topping hits include “I Like It” and the Maroon 5 collaboration “Girls Like You.”