Struct slack_chat_api::dnd::Dnd
source · pub struct Dnd {
pub client: Client,
}Fields§
§client: ClientImplementations§
source§impl Dnd
impl Dnd
sourcepub async fn end(&self) -> Result<DndEndSchema>
pub async fn end(&self) -> Result<DndEndSchema>
This function performs a POST to the /dnd.endDnd endpoint.
Ends the current user’s Do Not Disturb session immediately.
FROM: https://api.slack.com/methods/dnd.endDnd
Parameters:
token: &str– Authentication token. Requires scope:dnd:write.
sourcepub async fn end_snooze(&self) -> Result<DndEndSnoozeSchema>
pub async fn end_snooze(&self) -> Result<DndEndSnoozeSchema>
This function performs a POST to the /dnd.endSnooze endpoint.
Ends the current user’s snooze mode immediately.
FROM: https://api.slack.com/methods/dnd.endSnooze
Parameters:
token: &str– Authentication token. Requires scope:dnd:write.
sourcepub async fn info(&self, user: &str) -> Result<DndInfoSchema>
pub async fn info(&self, user: &str) -> Result<DndInfoSchema>
This function performs a GET to the /dnd.info endpoint.
Retrieves a user’s current Do Not Disturb status.
FROM: https://api.slack.com/methods/dnd.info
Parameters:
token: &str– Authentication token. Requires scope:dnd:read.user: &str– User to fetch status for (defaults to current user).
sourcepub async fn set_snooze(&self) -> Result<DndSetSnoozeSchema>
pub async fn set_snooze(&self) -> Result<DndSetSnoozeSchema>
This function performs a POST to the /dnd.setSnooze endpoint.
Turns on Do Not Disturb mode for the current user, or changes its duration.
sourcepub async fn team_info(&self, users: &str) -> Result<DndEndSchema>
pub async fn team_info(&self, users: &str) -> Result<DndEndSchema>
This function performs a GET to the /dnd.teamInfo endpoint.
Retrieves the Do Not Disturb status for up to 50 users on a team.
FROM: https://api.slack.com/methods/dnd.teamInfo
Parameters:
token: &str– Authentication token. Requires scope:dnd:read.users: &str– Comma-separated list of users to fetch Do Not Disturb status for.