Skip to content

Commit

Permalink
Export remove_all_club_reminders so runner can use it.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonthegeek committed May 24, 2024
1 parent 328ac91 commit eaa13e5
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export(dslc_slack_channels)
export(dslc_youtube_playlists)
export(process_youtube)
export(process_zoom)
export(remove_all_club_reminders)
export(reset_the)
export(slack_default_token)
export(slack_set_token)
Expand Down
23 changes: 23 additions & 0 deletions R/slack.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,21 @@ slack_set_token <- function(key_name = "SLACK_API_TOKEN", keyring = NULL) {
return(invisible(.keyring_try(key_name, keyring = keyring))) # nocov
}

#' Remove Zoom reminders
#'
#' Remove Zoom reminders from Slack channels.
#'
#' @inheritParams dslc_slack_channels
#' @param channel_name The name of the channel from which reminders should be
#' removed.
#' @param min_age_minutes How old messages need to be (in minutes) to be
#' cleared.
#' @param max_msgs_to_check How many messages to fetch to check for Zoom
#' reminders.
#' @param slack_channels A data.frame of Slack channels.
#'
#' @return NULL (invisibly)
#' @keywords internal
remove_slack_reminders <- function(channel_name,
min_age_minutes = 55,
max_msgs_to_check = Inf,
Expand Down Expand Up @@ -230,6 +245,14 @@ dslc_book_club_channels <- function(token = slack_default_token(),
dplyr::pull(.data$name)
}

#' Remove Book Club Zoom reminders
#'
#' Clear Zoom reminders from Book Club Slack channels.
#'
#' @inheritParams remove_slack_reminders
#'
#' @return NULL (invisibly)
#' @export
remove_all_club_reminders <- function(min_age_minutes = 55,
token = slack_default_token(),
slack_channels = dslc_slack_channels(
Expand Down
26 changes: 26 additions & 0 deletions man/remove_all_club_reminders.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions man/remove_slack_reminders.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit eaa13e5

Please sign in to comment.