From b1a7c1acf139efbb5312b4aa939bd94155e6a9e6 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Sat, 9 Jan 2016 08:54:07 -0600 Subject: adding different commands --- api/command_shrug.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 api/command_shrug.go (limited to 'api/command_shrug.go') 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: `¯\_(ツ)_/¯`} +} -- cgit v1.2.3-1-g7c22