You can set yourself to Do Not Disturb mode, which is kind of the same thing. Notifications are muted and the sender sees a 'Zzz' symbol next to your name.
If someone sends you a direct message they have the option to interrupt you if it's really important.