24 lines
424 B
Go
24 lines
424 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) error {
|
|
sendTyping(cmd.session, cmd.message.ChannelID)
|
|
|
|
img, err := inspiro.Generate()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
sendMessage(cmd.session, cmd.message.ChannelID, img)
|
|
return nil
|
|
},
|
|
help: "Get inspired!",
|
|
}
|
|
}
|