Caffeine is poisonous to slugs. Unfortunately, there's not much caffeine in leftover coffee grounds, and they probably don't like to eat it either.
I used to get buckets of coffee grounds from the cafeteria at work. I put them in the compost, filters and all. But then I got tired of picking the trash out of it. People don't understand the difference between trash and compost!