'use strict';

var exports = module.exports = {};

class Response {
  constructor(channel) {
    this.channel = channel;
    this.data = '';
    this.sent = false;
  }

  write(data) {
    this.data += data;
  }

  end(data) {
    if (!this.sent && data) {
      this.data += data;
      this.channel.send(this.data);
      this.sent = true;
    }
  }
}

exports.response = Response;

@@ -344,16 +344,116 @@
    %7D%0A  %7D
+%0A%0A  random(arr) %7B%0A    var data = arr%5BMath.floor(arr.length * Math.random())%5D%0A    this.end(data);%0A  %7D
 %0A%7D%0A%0Aexpo

Add response random method