2020-06-09 13:04:44 +00:00
|
|
|
package discord
|
|
|
|
|
2022-01-19 19:51:12 +00:00
|
|
|
import "git.jojodev.com/Minecraft/canopeas/inspiro"
|
2020-06-09 13:04:44 +00:00
|
|
|
|
|
|
|
func init() {
|
2021-02-23 05:53:55 +00:00
|
|
|
commands = append(commands, &command{
|
|
|
|
name: "inspire",
|
2020-06-09 13:04:44 +00:00
|
|
|
validate: func(cmd commandInit) bool {
|
|
|
|
return true
|
|
|
|
},
|
2020-06-12 05:17:58 +00:00
|
|
|
run: func(cmd commandInit) (string, error) {
|
2020-07-02 20:00:22 +00:00
|
|
|
if !memeRateLimit.Try() {
|
2020-07-02 21:33:47 +00:00
|
|
|
return "", nil
|
2020-07-02 20:00:22 +00:00
|
|
|
}
|
|
|
|
|
2020-06-09 13:04:44 +00:00
|
|
|
sendTyping(cmd.session, cmd.message.ChannelID)
|
|
|
|
|
|
|
|
img, err := inspiro.Generate()
|
|
|
|
if err != nil {
|
2020-06-12 05:17:58 +00:00
|
|
|
return "", err
|
2020-06-09 13:04:44 +00:00
|
|
|
}
|
|
|
|
|
2020-06-12 05:17:58 +00:00
|
|
|
return img, nil
|
2020-06-09 13:04:44 +00:00
|
|
|
},
|
|
|
|
help: "Get inspired!",
|
2021-02-23 05:53:55 +00:00
|
|
|
})
|
2020-06-09 13:04:44 +00:00
|
|
|
}
|