From 4c17bdff1bb871fb31520b7b547f584c53ed854f Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 8 Dec 2017 13:55:41 -0600 Subject: Add plugin slash command support (#7941) * add plugin slash command support * remove unused string * rebase --- plugin/api.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugin/api.go') diff --git a/plugin/api.go b/plugin/api.go index fee55eeff..437188f6e 100644 --- a/plugin/api.go +++ b/plugin/api.go @@ -16,6 +16,13 @@ type API interface { // struct that the configuration JSON can be unmarshalled to. LoadPluginConfiguration(dest interface{}) error + // RegisterCommand registers a custom slash command. When the command is triggered, your plugin + // can fulfill it via the ExecuteCommand hook. + RegisterCommand(command *model.Command) error + + // UnregisterCommand unregisters a command previously registered via RegisterCommand. + UnregisterCommand(teamId, trigger string) error + // CreateUser creates a user. CreateUser(user *model.User) (*model.User, *model.AppError) -- cgit v1.2.3-1-g7c22