summaryrefslogtreecommitdiff
path: root/views/simple.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-12-30 13:11:06 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-12-30 13:11:06 +0100
commitc6c5027865743328d0542246fef70e0fafe0f0f1 (patch)
tree9348d4afa900c170aa534f602b6f7a823292a831 /views/simple.js
parentabd33f47fbbcc92610b83341c61f5d1911eed590 (diff)
parent1881a2ecd48be772fd83b20068fe9946f1365eeb (diff)
downloaddiscordbot-c6c5027865743328d0542246fef70e0fafe0f0f1.tar.gz
discordbot-c6c5027865743328d0542246fef70e0fafe0f0f1.zip
Merge branch 'master' into developdevelop
Diffstat (limited to 'views/simple.js')
-rw-r--r--views/simple.js24
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;
+ }
+}