Difference between revisions of "TotalControl for LSL/Events/BOT EVENT LISTEN IM"
From SmartBots Developers Docs
(Created page with "{{DISPLAYTITLE:BOT_EVENT_LISTEN_IM}} <onlyinclude>Raised when Bot receives an instant message</onlyinclude> {{API Event Table}} {{API Variable Group|''event'' object properti...") |
(Correction) |
||
(One intermediate revision by one other user not shown) | |||
Line 4: | Line 4: | ||
{{API Event Table}} | {{API Event Table}} | ||
{{API Variable Group|''event'' object properties}} | {{API Variable Group|''event'' object properties}} | ||
− | {{API Variable|str}} | + | {{API Variable|str}} speakername: message |
{{API Variable|id}} uuid of sender | {{API Variable|id}} uuid of sender | ||
Line 13: | Line 13: | ||
<syntaxhighlight lang="lsl"> | <syntaxhighlight lang="lsl"> | ||
link_message( integer sender_num, integer num, string str, key id ) { | link_message( integer sender_num, integer num, string str, key id ) { | ||
− | /////////////////// Bot | + | /////////////////// Bot IM event |
if(num==BOT_EVENT_LISTEN_IM) { | if(num==BOT_EVENT_LISTEN_IM) { | ||
Latest revision as of 17:05, 20 March 2019
Raised when Bot receives an instant message
Reference
This event comes with the following event object:
Variable | Required | Description | |
---|---|---|---|
event object properties: | |||
str | speakername: message | ||
id | uuid of sender |
Example
link_message( integer sender_num, integer num, string str, key id ) {
/////////////////// Bot IM event
if(num==BOT_EVENT_LISTEN_IM) {
llOwnerSay("IM from bot: " + str);
}
}