Reddit is complete garbage, also influenced by GOV.... just as much as FB if not more. I stopped using when I got banned for politely asking the medical community about why my ears were (and still are) ringing from the J&J shot.
If this was done through apt then I would expect it to be in your logs unless they rotated out. Older logs may be .gz or .bz2 compressed. Oldest logs may be gone.
Your bot would not intentionally by design, but if it were tricked into parsing a malicious URL then the remote site could potentially trick your bot into executing code or commands but this is hypothetical and less likely than some application you installed pulling apache in as a dependency.
I would first check all the logs. Also look in /var/log/audit/audit.log if you have auditd enabled.