Passed
Push — master ( 4c4871...b1ea73 )
by Eric
01:51
created

index.js (70 issues)

Severity
1
'use strict';
2
3
class Module {
4
    constructor() {
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
5
        //all different commands
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
6
        this.commands = ["/catchPhrase", "/joke", "/asci", '/random', "/quote"];
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
7
8
        //all catchPhrases
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
9
        this.catchPhrase = ["Bernie, the bolt!", "Ooh, you are awful ... but I like you!",
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
10
            "You might very well think that; I couldn't possibly comment",
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
11
            "You stupid boy", "Here's Johnny", "Legendary"];
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
12
        //all jokes
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
13
        this.joke = ["I Googled how to start a wildfire. \n I got 48,500 matches.",
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
14
            "What’s the biggest pan in the world? \n Japan."];
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
15
        //all asci
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
16
        this.asci = ["(╯°□°)╯︵ ┻━┻", "┌∩┐(◣_◢)┌∩┐", "¯(ツ)_/¯", "༼ つ ◕_◕ ༽つ",
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
17
            "ಠ_ರೃ", "{ o }===(:::)", "︻デ┳═ー", "ᶠᶸᶜᵏ♥ᵧₒᵤ", "♪┏(°.°)┛┗(°.°)┓┗(°.°)┛┏(°.°)┓ ♪"];
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
18
        this.quote = ["Life can only be understood backwards; but it must be lived forwards.",
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
19
            "Beware the barrenness of a busy life.",
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
20
            "If you try, you risk failure. If you don’t, you ensure it.",
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
21
            "Life is a spell so exquisite that everything conspires to break it.",
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
22
            "If you do what you need, you’re surviving. If you do what you want, you’re living.",
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
23
            "Go confidently in the direction of your dreams. Live the life you have imagined.",
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
24
            "Live today, for tomorrow it will all be history."];
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
25
    }
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
26
27
    getCheckCommand(message) {
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
28
        let ret = message;
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
29
30
        if (this.commands.indexOf(ret) > -1) {
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
31
            console.log(ret + ' in commands');
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
32
            switch (ret) {
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
33
                case '/catchPhrase':
0 ignored issues
show
Expected indentation of 3 tabs but found 16 spaces.
Loading history...
34
                    ret = this.getCatchPrase();
0 ignored issues
show
Expected indentation of 4 tabs but found 20 spaces.
Loading history...
35
                    break;
0 ignored issues
show
Expected indentation of 4 tabs but found 20 spaces.
Loading history...
36
                case '/joke':
0 ignored issues
show
Expected indentation of 3 tabs but found 16 spaces.
Loading history...
37
                    ret = this.getJoke();
0 ignored issues
show
Expected indentation of 4 tabs but found 20 spaces.
Loading history...
38
                    break;
0 ignored issues
show
Expected indentation of 4 tabs but found 20 spaces.
Loading history...
39
                case '/asci':
0 ignored issues
show
Expected indentation of 3 tabs but found 16 spaces.
Loading history...
40
                    ret = this.getAsci();
0 ignored issues
show
Expected indentation of 4 tabs but found 20 spaces.
Loading history...
41
                    break;
0 ignored issues
show
Expected indentation of 4 tabs but found 20 spaces.
Loading history...
42
                case '/quote':
0 ignored issues
show
Expected indentation of 3 tabs but found 16 spaces.
Loading history...
43
                    ret = this.getQuote();
0 ignored issues
show
Expected indentation of 4 tabs but found 20 spaces.
Loading history...
44
                    break;
0 ignored issues
show
Expected indentation of 4 tabs but found 20 spaces.
Loading history...
45
            }
0 ignored issues
show
Expected indentation of 3 tabs but found 12 spaces.
Loading history...
46
        }
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
47
        return ret;
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
48
    }
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
49
50
    getCatchPrase() {
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
51
        let size = this.getCatchPraseSize();
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
52
53
        return this.catchPhrase[Math.floor(Math.random()*size)];
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
54
    }
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
55
56
    getCatchPraseSize() {
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
57
        return this.catchPhrase.length;
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
58
    }
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
59
60
    getJoke() {
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
61
        let size = this.getJokeSize();
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
62
63
        return this.joke[Math.floor(Math.random()*size)];
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
64
    }
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
65
66
    getJokeSize() {
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
67
        return this.joke.length;
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
68
    }
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
69
70
    getAsci() {
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
71
        let size = this.getAsciSize();
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
72
73
        return  this.asci[Math.floor(Math.random()*size)];
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
74
    }
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
75
76
    getAsciSize() {
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
77
        return this.asci.length;
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
78
    }
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
79
80
    getQuote() {
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
81
        let size = this.getQuoteSize();
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
82
83
        return this.quote[Math.floor(Math.random()*size)];
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
84
    }
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
85
86
    getQuoteSize() {
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
87
        return this.quote.length;
0 ignored issues
show
Expected indentation of 2 tabs but found 8 spaces.
Loading history...
88
    }
0 ignored issues
show
Expected indentation of 1 tab but found 4 spaces.
Loading history...
89
}
90
91
module.exports = Module;
92