pub struct Dnd {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl Dnd
impl Dnd
Sourcepub async fn end(&self) -> Result<Response<DndEndSchema>, ClientError>
pub async fn end(&self) -> Result<Response<DndEndSchema>, ClientError>
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<Response<DndEndSnoozeSchema>, ClientError>
pub async fn end_snooze( &self, ) -> Result<Response<DndEndSnoozeSchema>, ClientError>
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<Response<DndInfoSchema>, ClientError>
pub async fn info( &self, user: &str, ) -> Result<Response<DndInfoSchema>, ClientError>
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<Response<DndSetSnoozeSchema>, ClientError>
pub async fn set_snooze( &self, ) -> Result<Response<DndSetSnoozeSchema>, ClientError>
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<Response<DndEndSchema>, ClientError>
pub async fn team_info( &self, users: &str, ) -> Result<Response<DndEndSchema>, ClientError>
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.