Slack v0.9.0 Slack.Web.Dnd

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

Functions

end_dnd(optional_params \\ %{})

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
end_snooze(optional_params \\ %{})

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
info(optional_params \\ %{})

Retrieves a user’s current Do Not Disturb status.

Optional Params

  • user - User to fetch status for (defaults to current user) ex: U1234
set_snooze(num_minutes, optional_params \\ %{})

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
team_info(optional_params \\ %{})

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