Table of Contents

vci.message(receive comments)

Explanation of how we can use the message feature to receive comments.

Defined message types

Version name Content
1.5.4a Any string Messages emitted (vci.message.Emit) from a VCI script
1.5.6a comment Comment messages sent from the system

Show comments on the VCI console

main.lua
function onMessage(sender, name, message)
 
    -- User name and comment
    print(sender["name"].."「"..message.."」")
 
end
 
vci.message.On('comment', onMessage)

Content of the argument when a comment is received

Argument Content
sender[“name”] Name of the sender
sender[“type”] Type of the sender (In case of a comment, its “comment”)
sender[“commentSource”] In case of comment, the name of the comment source
a string such as Nicolive, Twitter, Showroom, etc.
name (In case of a comment, its “comment”)
message Body of the message

The difference between a comment and a message

To communicate between VCIs, you need to define three functions: Emit(), On() and a receiving function.
For comments, the Emit() is taken care of by Virtual Cast system, you only have to define On() and a receiving function.