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

cmd.YandexmapCommand   A

Complexity

Conditions 2

Size

Total Lines 7
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 6
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
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
}