You name the card during Brain Pry’s resolution, then the player reveals their hand and discards if appropriate. There is no way for the player to do anything between you naming the card and the player discarding.

Artwork
Loading artwork…
Brain Pry
Dissension · #39 · EN
Nonfoil—Foil—
Card rules
Choose a nonland card name. Target player reveals their hand. That player discards a card with that name. If they can't, you draw a card.
To the Rakdos, the fun is in the shakedown. The loot is usually discarded.
Uncommon · Illustrated by Jim Nelson
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
PreDH Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Pioneer Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If you target yourself with this spell, you must reveal your entire hand to the other players just as any other player would.