So sorry to hear he's not feeling well.
About the anti-diarrhea medication...I can't believe the vet told you to use that! We try to tell patients NOT to use those types of meds (Pepto, Immodium...etc...) because whatever's trying to get out just gets "stuck" in the bowels.
There's obviously something causing the diarrhea and he's having it for a reason. Personally, I wouldn't give the meds so that his little body can pass whatever the bacteria is.
That's just my opinion, though (based on what I've been taught for humans).

Jaden!