-
Notifications
You must be signed in to change notification settings - Fork 243
/
arts.js
46 lines (39 loc) · 971 Bytes
/
arts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
var bunnySay = require('sign-bunny');
var yosay = require('yosay');
var llamaSay = function(text) {
return `
${text}
∩∩
(・ω・)
│ │
│ └─┐○
ヽ 丿
∥ ̄∥`;
}
var catSay = function(text) {
return `
${text}
♪ ガンバレ! ♪
ミ ゛ミ ∧_∧ ミ゛ミ
ミ ミ ( ・∀・ )ミ゛ミ
゛゛ \ /゛゛
i⌒ヽ |
(_) ノ
∪`
;
}
function getCustomArt(art, textToSay) {
if (art === 'RANDOM') {
const arts = ['bunny', 'llama', 'cat', 'yeoman'];
const random = [Math.round(Math.random*arts.length)];
art = arts[random];
}
switch (art) {
case 'bunny' : return bunnySay(textToSay);
case 'llama' : return llamaSay(textToSay);
case 'cat' : return catSay(textToSay);
case 'yeoman': return yosay(textToSay);
default : return null;
}
}
module.exports = getCustomArt;