Downvoting
Mark a carter response as offensive/innappropriate or simply non-sensical
Downvoting is explained in the CarterAPI Docs. carter-js allows you to easily downvote a response by calling downvote()
and passing in a number of possibilities.
// assuming you have already created a Carter object called carter
const interaction = await carter.say("Hi Carter, say something that doesn't make sense please.")
const downvoted = await carter.downvote(interaction)
downvote()
returns a Boolean signifying success. The above examples passes an Interaction object to downvote()
, but it can take one of three things:
An Interaction object
A ConversationEntry object (obtained through carter-js' history tool)
A tid string
When passed either of the first two, downvote will try to extract the tid from its data. If this is not possible - likely because you passed an Interaction Object where the data
property was undefined, downvote()
will return false.
Last updated