| Conditions | 9 |
| Total Lines | 20 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package cmd |
||
| 8 | func AlbionCommand(ctx bot.Context) { |
||
| 9 | if len(ctx.Args) > 0 { |
||
| 10 | switch ctx.Args[0] { |
||
| 11 | case "kills": |
||
| 12 | if len(ctx.Args) > 1 { |
||
| 13 | ctx.MetricsCommand("albion", "kills") |
||
| 14 | ctx.AlbionShowKills() |
||
| 15 | } |
||
| 16 | case "kill": |
||
| 17 | if len(ctx.Args) > 1 { |
||
| 18 | ctx.MetricsCommand("albion", "kill") |
||
| 19 | ctx.AlbionShowKill() |
||
| 20 | } |
||
| 21 | case "watch": |
||
| 22 | if len(ctx.Args) > 1 { |
||
| 23 | err := ctx.Albion.Add(&ctx) |
||
| 24 | if err != nil { |
||
| 25 | ctx.ReplyEmbed("Albion Killboard", ctx.Loc("albion_add_error")) |
||
| 26 | } else { |
||
| 27 | ctx.ReplyEmbed("Albion Killboard", ctx.Loc("albion_added")) |
||
| 28 | } |
||
| 34 |