Yes, Discord has a security feature that scans uploaded files for malware. Despite that, you should avoid opening suspicious files since cybercriminals continuously find new ways to disguise malicious programs and spread them through the app.