Open the Settings menu in Discord by selecting the gear icon next to your username and avatar in the bottom left corner. On the left side of the window, select the "Privacy & Safety" tab. Then tick the "Keep Me Safe" option under "Safe Direct Messaging.