Slack v0.23.5 Slack.Web.Dnd View Source

Link to this section Summary

Functions

Ends the current user's Do Not Disturb session immediately

Ends the current user's snooze mode immediately

Retrieves a user's current Do Not Disturb status

Turns on Do Not Disturb mode for the current user, or changes its duration

Retrieves the Do Not Disturb status for users on a team

Link to this section Functions

Link to this function

end_dnd(optional_params \\ %{}) View Source

Ends the current user's Do Not Disturb session immediately.

Errors the API can return:

  • unknown_error - There was a mysterious problem ending the user's Do Not Disturb session
Link to this function

end_snooze(optional_params \\ %{}) View Source

Ends the current user's snooze mode immediately.

Errors the API can return:

  • snooze_end_failed - There was a problem setting the user's Do Not Disturb status
  • snooze_not_active - Snooze is not active for this user and cannot be ended
Link to this function

info(optional_params \\ %{}) View Source

Retrieves a user's current Do Not Disturb status.

Optional Params

  • user - User to fetch status for (defaults to current user) ex: U1234
Link to this function

set_snooze(num_minutes, optional_params \\ %{}) View Source

Turns on Do Not Disturb mode for the current user, or changes its duration.

Required Params

  • num_minutes - Number of minutes, from now, to snooze until. ex: 60

Errors the API can return:

  • missing_duration - No value provided for num_minutes
  • snooze_failed - There was a problem setting the user's Do Not Disturb status
Link to this function

team_info(optional_params \\ %{}) View Source

Retrieves the Do Not Disturb status for users on a team.

Optional Params

  • users - Comma-separated list of users to fetch Do Not Disturb status for ex: U1234,U4567