R/zzz.R

Defines functions .onAttach .onLoad

.onLoad <- function(lib,pkg) {
  if (isFALSE(as.logical(Sys.getenv('SLACK_SKIPLOAD')))) {
    if (nzchar(Sys.getenv('SLACK_API_TOKEN')) & interactive()) {
      info <- get_team_info(token = Sys.getenv('SLACK_API_TOKEN'))
      add_team(info$team$name, Sys.getenv('SLACK_API_TOKEN'))
      activate_team(info$team$name)
    }
  }
}

.onAttach <- function(lib,pkg) {
}
yonicd/slackteams documentation built on March 13, 2023, 6:26 a.m.