Sha256: e10a8bca69e3a6896185264d4a7052ffb657309d1cde5f8c40c8db47dae9418b

Contents?: true

Size: 1.86 KB

Versions: 1

Compression:

Stored size: 1.86 KB

Contents

# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

desc 'Adjust and view Do Not Disturb settings for team members.'
command 'dnd' do |g|
  g.desc "Ends the current user's Do Not Disturb session immediately."
  g.long_desc %( Ends the current user's Do Not Disturb session immediately. )
  g.command 'endDnd' do |c|
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.dnd_endDnd(options))
    end
  end

  g.desc "Ends the current user's snooze mode immediately."
  g.long_desc %( Ends the current user's snooze mode immediately. )
  g.command 'endSnooze' do |c|
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.dnd_endSnooze(options))
    end
  end

  g.desc "Retrieves a user's current Do Not Disturb status."
  g.long_desc %( Retrieves a user's current Do Not Disturb status. )
  g.command 'info' do |c|
    c.flag 'user', desc: 'User to fetch status for (defaults to current user).'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.dnd_info(options))
    end
  end

  g.desc 'Turns on Do Not Disturb mode for the current user, or changes its duration.'
  g.long_desc %( Turns on Do Not Disturb mode for the current user, or changes its duration. )
  g.command 'setSnooze' do |c|
    c.flag 'num_minutes', desc: 'Number of minutes, from now, to snooze until.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.dnd_setSnooze(options))
    end
  end

  g.desc 'Retrieves the Do Not Disturb status for up to 50 users on a team.'
  g.long_desc %( Retrieves the Do Not Disturb status for up to 50 users on a team. )
  g.command 'teamInfo' do |c|
    c.flag 'users', desc: 'Comma-separated list of users to fetch Do Not Disturb status for.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.dnd_teamInfo(options))
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slack-ruby-client-0.16.0 bin/commands/dnd.rb