code: async function cleanRoomHistory (robot, user, oldest) {
    try {
      const latest = new Date().toISOString()
      const roomId = user.roomID
      robot.logger.info(`[cleanRoomHistory] ${user.name} cleaning room ${user.room} from ${oldest} to ${latest}`)
      await robot.adapter.api.post('rooms.cleanHistory', { roomId, latest, oldest })
      return true
    } catch (err) {
      robot.logger.error(`[cleanRoomHistory] failed, ensure bot has \`clean-channel-history\` permission`, err)
    }
  }
docs: Use API to clear the room history (useful in testing, dangerous otherwise).
  Bot requires `clean-channel-history` permission.
  Test with `node docs/snippets cleanRoomHistory` from project root.
  @param {Robot} robot        Hubot instance
  @param {User} user          Hubot user object containing name and room
  @param {string} oldest      ISO date string to clean all messages since then
  @return {boolean|undefined} If room was cleaned