onCommentDownvoted( )


A backend event that fires when a forum comment is downvoted.

The onCommentDownvoted() event handler runs when an existing forum comment in your site is downvoted. The received DownvotedComment object contains information about the comment that was downvoted.

Notes:

  • Only comments on posts with a postType of "QUESTION" can be voted on.

  • Backend events are not fired when previewing your site.

Method Declaration
Copy
function onCommentDownvoted(event: DownvotedComment): void;
Method Parameters
eventDownvotedCommentRequired

Information about the forum comment that was downvoted.

A backend event that occurs when a forum comment is downvoted
JavaScript
// Place this code in a file named events.js // in the Backend section of your code files. export function wixForum_onCommentDownvoted(event) { const downvotedCommentId = event.commentId; console.log("Comment downvoted"); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?