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

    Modifier and Type
    Method
    Description
    boolean
    handleCommandMessage(com.inet.id.GUID channelId, com.inet.id.GUID messageId, com.inet.id.GUID userId, String text)
    Handles a command message that was sent as message in CoWork and started with a /
  • Method Details

    • handleCommandMessage

      boolean handleCommandMessage(@Nonnull com.inet.id.GUID channelId, @Nonnull com.inet.id.GUID messageId, @Nullable com.inet.id.GUID userId, @Nonnull 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 in
      messageId - 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 command
      text - the command text. The '/' is already removed.
      Returns:
      true if the message was handled
      Since:
      23.4