How to use the hubot.TextMessage 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 kengz / aiva / src / msg-emulator.js View on Github external
.then((user) => {
    const envelope = JSON.parse(user.envelope)
    const message = new TextMessage(envelope, `${global.robot.name} ${text}`, emulMsgID)
    global.robot.receive(message)
    // global.robot.send(envelope, 'Direct message')
  })
}
github shipengqi / sactive-bot / lib / adapters / wechat / wechat_client.js View on Github external
_notifyHubot(from, content, groupUser, MsgId) {
    let user = new User(from, {groupUser});
    if (this.ignoreGroupMessage && this._isGroup(from)) {
      return this.robot.logger.debug(`Ignore group message ${content}`);
    }
    this.robot.receive(new TextMessage(user, content, MsgId));
  }