Discord is safe to use but no built-in antivirus or anything. Files sent through discord uploaded to Discord cdn and if you click those links(inside or outside of discord) you could download unwanted/harmful software. Just take a look at links especially the end of the link if there is a file extension don't click. Unless you trust the sender.
It's safe as long as you are being safe with it. Like general use you are safe, but clicking random links without knowing what they are or downloading something someone posted can be dangerous.