Every attachment posted in a server is streamed straight into a SHA-256 hash, so nothing is written to disk. The hash is looked up against the VirusTotal API and the bot replies with a scan report.
Engines that flag the file are listed first, and the embed turns orange or red depending on how many of them agree. Files VirusTotal has never seen get a clear answer instead of a silent failure.
A verdict before the double click.
As soon as a message with attachments arrives, ScanClan answers with an orange ‘Scanning File ...’ embed, then edits it into a full report when VirusTotal replies. Every engine gets a line: a red dot and the detection name when it flags the file, a green dot when it doesn’t.
If nobody has ever uploaded the file to VirusTotal, the bot says exactly that instead of guessing.
Hash it, don’t keep it.
The file is never saved. Axios streams it from Discord’s CDN straight into a SHA-256 hash, one chunk at a time, and only that hash is sent to VirusTotal, never the file itself.
Engines that timed out or don’t support the file type are dropped, flagged ones are sorted to the top, and the embed color is plain arithmetic: more than 20% of engines flagging it turns it orange, more than 40% turns it red.