for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
package cmd
import (
"github.com/FlameInTheDark/dtbot/api/darksky"
"github.com/FlameInTheDark/dtbot/bot"
)
// WeatherCommand weather handler
func WeatherCommand(ctx bot.Context) {
ctx.MetricsCommand("weather", "main")
buf, err := darksky.GetWeatherImage(&ctx)
if err != nil {
ctx.Log("Weather", ctx.Guild.ID, err.Error())
return
}
ctx.ReplyFile("weather.png", buf)
func WeatherWeekCommand(ctx bot.Context) {
ctx.MetricsCommand("weather", "week")