In a large bowl, cream butter and both sugars until well blended. Add the eggs and vanilla extract and mix to combine.
In a separate bowl, sift flour, cocoa powder, baking soda, and salt together. Slowly add these ingredients into the butter mixture and stir until combined.
Fold in M&M's and walnuts (if you want). Chill dough for one hour or over night.
Preheat oven to 350 F
Drop dough by rounded table spoons onto a lightly greased cookie tray, about 2 inches apart.
Bake for desired time. 7-9 for chewy cookies, 10-12 for crunchy cookies.
Notes
This said bake for 7-9 Minutes for chewy cookies, and 10-12 for crunchy cookies. I did them about 9, and depending on the cookie sheet I used, I got crunchy and chewy. So be careful of your first batch.