Passed
Push — master ( d7840c...df15e8 )
by Viktor
01:26
created

cmd/yandexmapcommand.go   A

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 10
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A cmd.YandexmapCommand 0 7 2
1
package cmd
2
3
import (
4
	"github.com/FlameInTheDark/dtbot/api/yandexmap"
5
	"github.com/FlameInTheDark/dtbot/bot"
6
)
7
8
// WeatherCommand weather handler
0 ignored issues
show
introduced by
comment on exported function YandexmapCommand should be of the form "YandexmapCommand ..."
Loading history...
9
func YandexmapCommand(ctx bot.Context) {
10
	buf, err := yandexmap.GetMapImage(&ctx)
11
	if err != nil {
12
		ctx.DB.Log("Map", ctx.Guild.ID, err.Error())
13
		return
14
	}
15
	ctx.ReplyFile("map.png",buf)
16
}