Then you can write com.submit("the text you want to submit on behalf of the user"), and you can of course generate that text via the ai-text-plugin.
You can get existing comments (to give them to the ai-text-plugin as part of the instruction which gets it to generate a comment) using com.comments. Also see these examples:
If I understand your question correctly, I think you’re looking for this example: https://perchance.org/programmatic-get-set-submit-comments-plugin-example#edit
Basically, if you have this in your HTML panel:
[com = commentsPlugin(options)]
Then you can write
com.submit("the text you want to submit on behalf of the user")
, and you can of course generate that text via the ai-text-plugin.You can get existing comments (to give them to the ai-text-plugin as part of the instruction which gets it to generate a comment) using
com.comments
. Also see these examples:There is code in https://perchance.org/tabbed-comments-plugin-v1#edit which does what you want, but there’s a lot of other code in there too, so it’s not a very ‘educational’ example. Or if you just want to use that plugin, you can of course do that. Here’s an example: https://perchance.org/m56h7orowv#edit