diff options
Diffstat (limited to 'views/simple.js')
| -rw-r--r-- | views/simple.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/views/simple.js b/views/simple.js new file mode 100644 index 0000000..5e8701a --- /dev/null +++ b/views/simple.js @@ -0,0 +1,24 @@ +#!/usr/bin/node +/* jshint esnext:true */ +"use strict"; + +const View = require("./view"), + util = require("../util"), + api = require("../api"), + strings = require("../strings"), + oneLine = require("common-tags").oneLine; + +const SimpleView = module.exports; + +// just respond with a text +module.exports = class extends View { + async text(txt) { + return txt; + } + + async respond(text) { + this.response = await util.respond(this.msg, + await this.text(text), this.response); + return this.response; + } +} |
