Skip to content
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.

Commit

Permalink
goapp-release: add help message
Browse files Browse the repository at this point in the history
  • Loading branch information
ucirello committed Mar 14, 2016
1 parent d4a5f05 commit a547d16
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugins/gochatbot-plugin-goapp-release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ func (r GoAppReleasePlugin) helpMessage() string {
}

func (r *GoAppReleasePlugin) parseMessage(in *messages.Message) error {
if in.Message == r.botName+" release" || in.Message == "help" || in.Message == "release help" {
return r.comm.Send(&messages.Message{
Room: in.Room,
ToUserID: in.FromUserID,
ToUserName: in.FromUserName,
Message: r.helpMessage(),
})
}

msg := strings.TrimSpace(in.Message)
checkPrefix := r.botName + " release "
if msg == "" || !strings.HasPrefix(msg, checkPrefix) {
Expand Down

0 comments on commit a547d16

Please sign in to comment.