Then you pour cheap beer (let’s not treat them to a nice microbrew!) to about the halfway point on the can. Slugs are attracted to the smell of the yeast in the beer. They slither over to get some, fall in and drown.
As someone I know once said, don’t fill the can to the rim with beer because otherwise, you’ve created a “slug pub!” (meaning, they can come for a drink and easily reach the beer without falling in!)
I have also caught pillbugs and earwigs in the beer traps… unintentionally, but if they are causing a problem with the same crop in that bed, it’s a bit of a bonus.