Passed
Push — master ( 680ae2...941a80 )
by Viktor
01:37
created

cmd.AlbionCommand   B

Complexity

Conditions 6

Size

Total Lines 12
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 6
eloc 11
nop 1
dl 0
loc 12
rs 8.6666
c 0
b 0
f 0
1
package cmd
2
3
import (
4
	"github.com/FlameInTheDark/dtbot/api/albion"
5
	"github.com/FlameInTheDark/dtbot/bot"
6
)
7
8
// AlbionCommand handle dice
9
func AlbionCommand(ctx bot.Context) {
10
	if len(ctx.Args) > 0 {
11
		switch ctx.Args[0] {
12
		case "kills":
13
			if len(ctx.Args) > 1 {
14
				ctx.MetricsCommand("albion", "kills")
15
				albion.ShowKills(&ctx)
16
			}
17
		case "kill":
18
			if len(ctx.Args) > 1 {
19
				ctx.MetricsCommand("albion", "kill")
20
				albion.ShowKill(&ctx)
21
			}
22
		}
23
	}
24
25
}
26