I wish to designed a little change for WordPress comment function. That can help me prevent spammers. My idea is:

When comment form is posted, my function can get the comment content (email, website, content,..) if one of these or all are contained some words that in blacklist, the comment is going to be reject immediately.

Please let me know be aware of function assist me to get comment content and how can i offer action.

Thanks a lot !

You might want to browse the hook comment_post_redirect, that is known as following the form is published. There you may decide to verify the comment.

Or make use of the hook comment_publish, which runs after saving the comment to DB, however, you can continue to measure the level as Junk e-mail.