From 2464a0f75c1b4866d4de3724371b805ac62b1ca1 Mon Sep 17 00:00:00 2001 From: Loic Bersier <loic.bersier1@gmail.com> Date: Sat, 22 Sep 2018 18:27:06 +0200 Subject: [PATCH] Repeat the text in dancing letters ( probably bad code have to make it better ) --- commands/fun/test.js | 33 +++++++++++++++++++++++++++++++++ emojiCharacters.js | 9 +++++++++ 2 files changed, 42 insertions(+) create mode 100644 commands/fun/test.js create mode 100644 emojiCharacters.js diff --git a/commands/fun/test.js b/commands/fun/test.js new file mode 100644 index 0000000..3f91659 --- /dev/null +++ b/commands/fun/test.js @@ -0,0 +1,33 @@ +const { Command } = require('discord.js-commando'); +const emojiCharacters = require('../../emojiCharacters'); +module.exports = class testCommand extends Command { + constructor(client) { + super(client, { + name: 'emotesay', + group: 'fun', + memberName: 'emotesay', + description: `repeat the text in dancing letters`, + args: [ + { + key: 'text', + prompt: 'What do you want me to say', + type: 'string', + } + ] + }); + } + + async run(message, { text }) { + let textChar = text.split('') + let i = text.length; + let emojiArray = []; + message.delete(); + for (i = 0; i < text.length; i++) { + emojiArray[i] = emojiCharacters[textChar[i]]; + } + let finalText = emojiArray.join(""); + message.say(finalText) + + + } +}; \ No newline at end of file diff --git a/emojiCharacters.js b/emojiCharacters.js new file mode 100644 index 0000000..15e4bca --- /dev/null +++ b/emojiCharacters.js @@ -0,0 +1,9 @@ +module.exports = { + a: '<a:a:493014525226778624>', b: '<a:b:493014525696802817>', c: '<a:c:493014525457596417>', d: '<a:d:493014526791254026>', + e: '<a:e:493014525373710339>', f: '<a:f:493014525788946443>', g: '<a:g:493014525151543297>', h: '<a:h:493014525256138763>', + i: '<a:i:493014525566648321>', j: '<a:j:493014525738614806>', k: '<a:k:493014525336092673>', l: '<a:l:493014525134635039>', + m: '<a:m:493014525927227392>', n: '<a:n:493014525746872323>', o: '<a:o:493014525847797761>', p: '<a:p:493014525788815371>', + q: '<a:q:493014525344219137>', r: '<a:r:493014525914775562>', s: '<a:s:493014525335961601>', t: '<a:t:493014525818306560>', + u: '<a:u:493014525466116097>', v: '<a:v:493014525432561666>', w: '<a:w:493014525885546497>', x: '<a:x:493014525801660426>', + y: '<a:y:493014525042360329>', z: '<a:z:493014525856055306>', '': ' ' +}; \ No newline at end of file