We may be living in the era of the post-comedy comedy, but Wednesday’s première of “It’s Always Sunny in Philadelphia,” which is back for its thirteenth season, is a reminder that there’s still a place for comedy comedy—hilarious, grotesque, delirious, pointless comedy.

The episode begins with the gang—minus Dennis (Glenn Howerton, absent, allegedly, because of scheduling conflicts) and plus Cindy (Mindy Kaling, immediately in the groove of the series’ sicko flow)—having turned its bar, Paddy’s, into a stronghold of the Resistance, a sanctum of liberal solidarity in the Trump era. It’s a solid premise, but it’s immediately tossed aside: already bored, the gang decides to pivot and try luring conservatives instead (hence the episode’s title, “The Gang Makes Paddy’s Great Again”). That’s another good idea for an episode, but it, too, is mostly discarded in favor of a deeply weird side plot about Mac (Rob McElhenney) ordering a lifelike Dennis sex doll, with a mouth frozen open in a circle to appear, as Mac lamely explains, as “though it’s in mid-conversation”—though the rest of the gang sees its real purpose.

The gag is a meta-joke about Howerton’s absence, and it seems possible, at first, that “It’s Always Sunny” might try to pull off an entire season with a sex doll standing in for one of its stars. It’s no insult to Howerton to say that Dennis’s character can mostly be conveyed by an inert, silent dummy; his strutting, preening, psychopathic personality comes through just by looking at the doll’s blank face. Soon, Mac, Dee (Kaitlin Olson), Charlie (Charlie Day), and Frank (Danny DeVito) begin imagining the doll negging them, just as Dennis did, and become wracked by feelings of inadequacy. Cindy tries to refocus the gang, but the doll, as in a horror movie, has taken control. A gun goes off. A character backslides into alcoholism. At least four people have sex with the doll. The episode is the funniest twenty-two minutes of 2018 so far, and if it weren’t the season première, it might have served nicely as a series finale—a coda before the cast members, being drawn apart by real-world commitments, went their separate ways.

There has, in fact, been some talk of the series winding down. At the end of the show’s last season, Dennis had left Philadelphia for North Dakota, and Howerton, who also stars in the NBC sitcom “A.P. Bio,” later announced that he would be sitting out the new season. Fans faced the prospect of a reduced or altered gang with trepidation. Was the show, like so many of the sitcoms it had parodied over the years, making lame compromises simply to hang on a little longer?

The première takes these questions head on. The introduction of Kaling, a sitcom stalwart, as the “new girl” is itself a play on the idea of the tired TV show trying to freshen itself. Later in the episode, when the gang goes to a strip club to cheer themselves up, as they’ve done countless times in the past, Frank suggests that he’s no longer into it. “I feel like I’m forcing it,” he says. Maybe this really is the end; sitcoms shouldn’t last forever. But then, in a great twist, the real Dennis reappears, and the gang, made to choose between competent and empowering Cindy and cruel, useless Dennis, goes with their awful old pal.

Even in its thirteenth season, there is, it seems, more for the series to say—a group of reactionary, mean-spirited, lying degenerates seems perfectly suited to the moment. In one episode, Dee mocks a mild-mannered flight attendant, calling him a “soy-boy beta cuck.” In another episode, the gang attends a sexual-harassment seminar, hijacks the expressions “Me Too” and “Time’s Up,” and downplays their past indiscretions as “locker room” talk. In Episode 2, while playing an escape-room game, the guys pump themselves up by repeating the phrase “art of the deal,” like a mantra for macho idiocy. They scoff at the notion of Dee being in charge, recalling that America recently had a referendum about female leadership and voted against it. “We couldn’t have been more clear about it,” Mac says. The gang, after all, was deplorable long before there was a popular term for it.

Yet while the series has, over the years, made surprisingly cogent arguments about everything from gun control to mental illness, its true dedication has been to its own flavor of nonsense, and to itself. In these later stages, it has taken to consuming its own history and probing the question of whether it should even exist anymore. The third episode of the season is an all-female reboot of an earlier episode, from Season 10, in which the gang tries to drink seventy beers apiece on a cross-country flight, in homage to an apocryphal story about the baseball Hall of Famer Wade Boggs. (This time, the women are on a flight to California for the Women’s March.) The premise is a goof on the notion of all-female casts limiting themselves to reproductions of male roles, but mostly it’s just an exercise in how much the series can squeeze out of its own past.

“It’s Always Sunny” has always referred to its quintet as a gang, both to emphasize the characters’ brutishness and to set them apart from more familiar sitcom friend groups. But, at this point, exiled in the network’s outer reaches (on FXX since Season 9) and still being passed over for awards and even nominations, they are more like an alienated, bitterly funny family. McElhenney and Olson are married in real life; so are Day and Mary Elizabeth Ellis (who plays a character known only as the Waitress). By now, the show is unlikely to win over many new fans, and it’s hard to imagine having a clue what’s going on in the new season without having been around for the duration. Maybe this is the best outcome of the peak TV era, that a series can exist in its own little corner, for its own small and dedicated audience, and for its makers themselves. “The problem is that we’re trying to do things that we used to do, but things are different now,” Mac says at one point. A smarter or better group of people might respond to that problem by changing, growing. But, thankfully, the gang, and the series, has doubled down on staying exactly the same.