aboutsummaryrefslogtreecommitdiff
path: root/badapple.js
diff options
context:
space:
mode:
Diffstat (limited to 'badapple.js')
-rw-r--r--badapple.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/badapple.js b/badapple.js
new file mode 100644
index 0000000..c8b56c5
--- /dev/null
+++ b/badapple.js
@@ -0,0 +1,21 @@
+const badapple = require("./badapple.json")
+
+module.exports = {
+ badapple: {
+ operator: true,
+ func: msg => msg.reply("loading...")
+ .then(canvas => {
+ const frames = badapple.frames.map(frame => "```\n" + frame + "```")
+
+ const iv = setInterval(_ => {
+ const frame = frames.shift()
+
+ if (frame)
+ canvas.edit(frame)
+ else
+ clearInterval(iv)
+
+ }, 1000 / badapple.fps)
+ })
+ }
+}