Tasker allows you to do all kinds of custom things, but the most similar to "Do Not Disturb" modes are Tasker Profiles under the "Profile" and "Volume" headings. Some examples:
What I especially like to do is create a new quick setting for the Tasker profile . (note that "quick settings" are also called "tiles" in Android Developer lingo)
You have to use Tasker > Preferences > Action > Quick Settings Tasks, but be aware that there are only three slots available to use.
I often create a "full silent mode" with this, that enables "Do Not Disturb" mode, but also sets the volume to zero for alarms.
You can now customize what "Do Not Disturb" will affect from within Tasker.