Add help command
This commit is contained in:
parent
747f282b33
commit
c3d10f1d6e
|
@ -127,7 +127,7 @@ func (p *Plugin) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Req
|
||||||
func (p *Plugin) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) {
|
func (p *Plugin) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) {
|
||||||
input := strings.TrimSpace(strings.TrimPrefix(args.Command, "/meme"))
|
input := strings.TrimSpace(strings.TrimPrefix(args.Command, "/meme"))
|
||||||
|
|
||||||
if input == "" {
|
if input == "" || input == "help" {
|
||||||
var availableMemes []string
|
var availableMemes []string
|
||||||
for name, metadata := range memelibrary.Memes() {
|
for name, metadata := range memelibrary.Memes() {
|
||||||
availableMemes = append(availableMemes, name)
|
availableMemes = append(availableMemes, name)
|
||||||
|
|
Loading…
Reference in a new issue