forked from Minecraft/canopeas
27 lines
457 B
Go
27 lines
457 B
Go
package discord
|
|
|
|
import "go.etztech.xyz/inspiro"
|
|
|
|
func init() {
|
|
commands["inspire"] = command{
|
|
validate: func(cmd commandInit) bool {
|
|
return true
|
|
},
|
|
run: func(cmd commandInit) (string, error) {
|
|
if !memeRateLimit.Try() {
|
|
return "Woah, slow down!", nil
|
|
}
|
|
|
|
sendTyping(cmd.session, cmd.message.ChannelID)
|
|
|
|
img, err := inspiro.Generate()
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
|
|
return img, nil
|
|
},
|
|
help: "Get inspired!",
|
|
}
|
|
}
|