summaryrefslogtreecommitdiffstats
path: root/plugin/api.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-12-08 13:55:41 -0600
committerGitHub <noreply@github.com>2017-12-08 13:55:41 -0600
commit4c17bdff1bb871fb31520b7b547f584c53ed854f (patch)
treeedf1e3295d6ff7d67281efc585b2e913b4efda3d /plugin/api.go
parent7ed1177a2b676aa4c93515268642c855cfe57a37 (diff)
downloadchat-4c17bdff1bb871fb31520b7b547f584c53ed854f.tar.gz
chat-4c17bdff1bb871fb31520b7b547f584c53ed854f.tar.bz2
chat-4c17bdff1bb871fb31520b7b547f584c53ed854f.zip
Add plugin slash command support (#7941)
* add plugin slash command support * remove unused string * rebase
Diffstat (limited to 'plugin/api.go')
-rw-r--r--plugin/api.go7
1 files changed, 7 insertions, 0 deletions
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)