Commands
- class matterapi.endpoints.async_api.CommandsApi(client: matterapi.client.base.BaseClient, skip_response_parsing: bool = False)
Endpoints for creating, getting and updating slash commands.
- async create_command(*, json_body: Union[matterapi.models.CreateCommandJsonBody, Dict]) matterapi.models.Command
Create a command
Create a command for a team.
- Permissions:
manage_slash_commands for the team the command is in.
- Api Reference:
- async delete_command(command_id: str) matterapi.models.StatusOK
Delete a command
Delete a command based on command id string.
- Permissions:
Must have manage_slash_commands permission for the team the command is in.
- Api Reference:
- async execute_command(*, json_body: Union[matterapi.models.ExecuteCommandJsonBody, Dict]) matterapi.models.CommandResponse
Execute a command
Execute a command on a team.
- Permissions:
Must have use_slash_commands permission for the team the command is in.
- Api Reference:
- async get_command_by_id(command_id: str) matterapi.models.Command
Get a command
Get a command definition based on command id string.
- Permissions:
Must have manage_slash_commands permission for the team the command is in.
- Minimum Server Version:
5.22
- Api Reference:
- async list_autocomplete_commands(team_id: str) List[matterapi.models.Command]
List autocomplete commands
List autocomplete commands in the team.
- Permissions:
view_team for the team.
- Api Reference:
- async list_command_autocomplete_suggestions(team_id: str, *, user_input: str) List[matterapi.models.AutocompleteSuggestion]
List commands’ autocomplete data
List commands’ autocomplete data for the team.
- Permissions:
view_team for the team.
- Minimum Server Version:
5.24
- Api Reference:
- async list_commands(*, team_id: Optional[str] = None, custom_only: Optional[bool] = False) List[matterapi.models.Command]
List commands for a team
List commands for a team.
- Permissions:
manage_slash_commands if need list custom commands.
- Api Reference:
- async move_command(command_id: str, *, json_body: Union[matterapi.models.MoveCommandJsonBody, Dict]) matterapi.models.StatusOK
Move a command
Move a command to a different team based on command id string.
- Permissions:
Must have manage_slash_commands permission for the team the command is currently in and the destination team.
- Minimum Server Version:
5.22
- Api Reference:
- async regen_command_token(command_id: str) matterapi.models.RegenCommandTokenResponse200
Generate a new token
Generate a new token for the command based on command id string.
- Permissions:
Must have manage_slash_commands permission for the team the command is in.
- Api Reference:
- async update_command(command_id: str, *, json_body: Union[matterapi.models.Command, Dict]) matterapi.models.Command
Update a command
Update a single command based on command id string and Command struct.
- Permissions:
Must have manage_slash_commands permission for the team the command is in.
- Api Reference: