Slack.Web.Files.Comments (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Add a comment to an existing file.

Deletes an existing comment on a file.

Edit an existing file comment.

Functions

add(comment, file, optional_params \\ %{})

Add a comment to an existing file.

API reference

View on docs.slack.dev ↗

Required Params

  • comment - Text of the comment to add. ex: Everyone should take a moment to read this file.
  • file - File to add a comment to. ex: F1234567890

Errors the API can return:

  • file_deleted - The requested file was previously deleted.
  • file_not_found - The requested file could not be found.
  • no_comment - The comment field was empty.

See the Common Errors guide for errors returned by every Web API method.

delete(file, id, optional_params \\ %{})

Deletes an existing comment on a file.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • file - File to delete a comment from. ex: F1234567890
  • id - The comment to delete. ex: Fc1234567890

Errors the API can return:

  • cant_delete - The requested comment could not be deleted.
  • file_deleted - The requested file was previously deleted.
  • file_not_found - The requested file could not be found.

See the Common Errors guide for errors returned by every Web API method.

edit(comment, file, id, optional_params \\ %{})

Edit an existing file comment.

API reference

View on docs.slack.dev ↗

Required Params

  • comment - Text of the comment to edit. ex: Everyone should take a moment to read this file, seriously.
  • file - File containing the comment to edit. ex: F1234567890
  • id - The comment to edit. ex: Fc1234567890

Errors the API can return:

  • cant_edit - The requested file could not be found.
  • edit_window_closed - The timeframe for editing the comment has expired.
  • file_deleted - The requested file was previously deleted.
  • file_not_found - The requested file could not be found.
  • no_comment - The comment field was empty.

See the Common Errors guide for errors returned by every Web API method.