Package com.inet.cowork.api.commands
Interface CoWorkCommandHandler
-
public interface CoWorkCommandHandler
Handler interface for CoWork Commands (texts that start with /). Must be registered in ServerPluginManager. Also register a CoWorkCommandProvider to be listed in the list of / commands. You can post a message back into the channel using the CoWork API, e.g.:String replyText = ...; CoWorkManager.getInstance().addMessage( null, channelId, null, messageId, replyText, null );
- Since:
- 23.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
handleCommandMessage(com.inet.id.GUID channelId, com.inet.id.GUID messageId, com.inet.id.GUID userId, java.lang.String text)
Handles a command message that was sent as message in CoWork and started with a /
-
-
-
Method Detail
-
handleCommandMessage
boolean handleCommandMessage(@Nonnull com.inet.id.GUID channelId, @Nonnull com.inet.id.GUID messageId, @Nullable com.inet.id.GUID userId, @Nonnull java.lang.String text)
Handles a command message that was sent as message in CoWork and started with a /- Parameters:
channelId
- the id of the channel the command is posted inmessageId
- the id of the message that contains the command. Can be used to answer to this message with a reply.userId
- the id of the user who posted the commandtext
- the command text. The '/' is already removed.- Returns:
true
if the message was handled- Since:
- 23.4
-
-