Difference between revisions of "Bot Playground/Commands/say"

From SmartBots Developers Docs
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} {{NavMenu}} __NOTOC__")
 
 
Line 1: Line 1:
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
 +
<onlyinclude>Says message over a specific chat channel.</onlyinclude>
  
 +
<syntaxhighlight lang="javascript">
 +
Bot.say(channel, message);
 +
</syntaxhighlight>
  
 +
{{API Command Table}}
 +
{{API Required Vars|login}}
  
 +
{{API Variable Group|Input}}
 +
{{API Variable|channel|yes}} The channel to say message over (0 - public chat)
 +
{{API Variable|message|yes}} The message to send
 +
 +
{{API Variable Group|Output}}
 +
{{API Return promise}}
 +
 +
{{API Variables Table End}}
 +
 +
== Examples ==
 +
 +
<syntaxhighlight lang="javascript">
 +
Bot.say(0, "Hello World!");
 +
</syntaxhighlight>
  
 
{{NavMenu}}
 
{{NavMenu}}
 
__NOTOC__
 
__NOTOC__

Latest revision as of 14:51, 1 July 2016

Says message over a specific chat channel.

Bot.say(channel, message);

Reference

This command accepts the following parameters:

Variable Required Description


Input:
channel yes The channel to say message over (0 - public chat)
message yes The message to send
Output:
Function returns a Promise with the following data:
success bool true if command completed successfully
error string error string if command has failed

Examples

Bot.say(0, "Hello World!");