How to use the hubot/es2015.User function in hubot

To help you get started, we’ve selected a few hubot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mtsmfm / hubot-test-helper / src / index.js View on Github external
return new Promise(resolve => {
      userParams.room = this.name;
      const user = new Hubot.User(userName, userParams);
      this.robot.receive(new Hubot.LeaveMessage(user), resolve);
    });
  }
github mtsmfm / hubot-test-helper / src / index.js View on Github external
return new Promise(resolve => {
      userParams.room = this.name;
      const user = new Hubot.User(userName, userParams);
      this.robot.receive(new Hubot.EnterMessage(user), resolve);
    });
  }
github mtsmfm / hubot-test-helper / src / index.js View on Github external
return new Promise(resolve => {
      let textMessage = null;
      if ((typeof message === 'object') && message) {
        textMessage = message;
      } else {
        userParams.room = this.name;
        const user = new Hubot.User(userName, userParams);
        textMessage = new Hubot.TextMessage(user, message);
      }

      this.messages.push([userName, textMessage.text]);
      this.robot.receive(textMessage, resolve);
    });
  }