diff options
author | =Corey Hulen <corey@hulen.com> | 2016-01-09 08:54:07 -0600 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-01-09 08:54:07 -0600 |
commit | b1a7c1acf139efbb5312b4aa939bd94155e6a9e6 (patch) | |
tree | e47ec1ff21092af62b7be1218ba56472fcb60fad /api/command_shrug.go | |
parent | 25538df397f46d03b99a4b492bcef7cf68859a8a (diff) | |
download | chat-b1a7c1acf139efbb5312b4aa939bd94155e6a9e6.tar.gz chat-b1a7c1acf139efbb5312b4aa939bd94155e6a9e6.tar.bz2 chat-b1a7c1acf139efbb5312b4aa939bd94155e6a9e6.zip |
adding different commands
Diffstat (limited to 'api/command_shrug.go')
-rw-r--r-- | api/command_shrug.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/api/command_shrug.go b/api/command_shrug.go new file mode 100644 index 000000000..e34f80110 --- /dev/null +++ b/api/command_shrug.go @@ -0,0 +1,29 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package api + +import ( + "github.com/mattermost/platform/model" +) + +type ShrugProvider struct { +} + +func init() { + RegisterCommandProvider(&ShrugProvider{}) +} + +func (me *ShrugProvider) GetCommand() *model.Command { + return &model.Command{ + Trigger: "shrug", + AutoComplete: true, + AutoCompleteDesc: `Adds ¯\_(ツ)_/¯ to your message`, + AutoCompleteHint: "[message]", + DisplayName: "shrug", + } +} + +func (me *ShrugProvider) DoCommand(c *Context, channelId string, message string) *model.CommandResponse { + return &model.CommandResponse{ResponseType: model.COMMAND_RESPONSE_TYPE_IN_CHANNEL, Text: `¯\_(ツ)_/¯`} +} |