From 53d43508a61a54c98fd8317809ee6e0c96a34ffa Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sun, 24 Sep 2017 03:46:07 +0000 Subject: [PATCH] Tableflip Command --- commands/random/tableflip.js | 30 ++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 commands/random/tableflip.js diff --git a/commands/random/tableflip.js b/commands/random/tableflip.js new file mode 100644 index 00000000..8806826c --- /dev/null +++ b/commands/random/tableflip.js @@ -0,0 +1,30 @@ +const Command = require('../../structures/Command'); +const { wait } = require('../../structures/Util'); +const frames = [ + '(-°□°)- ┬─┬', + '(╯°□°)╯ ]', + '(╯°□°)╯ ︵ ┻━┻', + '(╯°□°)╯ [', + '(╯°□°)╯ ┬─┬' +]; + +module.exports = class TableflipCommand extends Command { + constructor(client) { + super(client, { + name: 'tableflip', + aliases: ['a-tableflip', 'animated-tableflip'], + group: 'random', + memberName: 'tableflip', + description: 'Flips a table... With animation!' + }); + } + + async run(msg) { + const message = await msg.say('(\\\\°□°)\\\\ ┬─┬'); + for (const frame of frames) { + await wait(400); + await message.edit(frame); + } + return message; + } +}; diff --git a/package.json b/package.json index 5c58b9ab..c8d9631d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "42.7.1", + "version": "42.8.0", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {