streamelements_widget

This feature allows advanced users to create an interface between StreamElements widgets and DeepBot. Depending on the complexity of the SE widget, some programming knowledge may be needed to support advanced integration.



  • In the Javascript editor within StreamElements, you would need to load the DeepBot connection script by adding:
  <script src="https://deepbot.tv/widgets/dbwebconnect/0.0.1/DBWebConnect.js"></script>
  • To configure the script, you would create a function and specify the IP address of the PC running DeepBot (blank for localhost) and the widget ID and name by adding the following function:
  DeepBot.DeepBotPreConnectionSettings = function() {
      DeepBot.ip = "";
      DeepBot.widget = "shoutout";
      DeepBot.name = "default";
  }
  • With this, the widget should be able to send messages to DeepBot using the SendToDB function like so:
  DeepBot.SendToDB(`${user} won ${reward}`);
  • This will trigger the custom command in DeepBot which is listening the the redemption trigger of custom.shoutout.default
  • To trigger the widget from DeepBot, you will need to understand how the widget works.
  • @customwebmsg@[widgetname|default|arguments/message] can be used to send messages to the widget. This will trigger the following function in the widget which you would need to edit to trigger the appropriate action.
  DeepBot.DeepBotMessageTrigger = function (args) {
      if (args !== null) {
          console.log(`Got ${args} from DeepBot`);
     }
 }
  • streamelements_widget.txt
  • Last modified: 2020/09/20 11:23
  • by expertsonline