| Total Lines | 14 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package cmd |
||
| 2 | |||
| 3 | import ( |
||
| 4 | "fmt" |
||
| 5 | "github.com/FlameInTheDark/dtbot/api/fun" |
||
| 6 | "github.com/FlameInTheDark/dtbot/bot" |
||
| 7 | ) |
||
| 8 | |||
| 9 | // SlapCommand returns slap image |
||
| 10 | func SlapCommand(ctx bot.Context) { |
||
| 11 | if len(ctx.Args) > 0 { |
||
| 12 | url, err := fun.GetImageURL("slap") |
||
| 13 | if err != nil { |
||
| 14 | ctx.ReplyEmbedAttachmentImageURL(fmt.Sprintf("%v slaping %v", ctx.User.Mention(), ctx.Args[0]), url) |
||
| 15 | } |
||
| 18 |