Molière said this quote

The duty of comedy is to correct men by amusing them.