Class: Rubycam::CLI::Commands::Preset

Inherits:
ObsbotCommand show all
Defined in:
lib/rubycam/cli.rb

Instance Method Summary collapse

Instance Method Details

#call(number:, **options) ⇒ Object



269
270
271
272
273
274
275
276
# File 'lib/rubycam/cli.rb', line 269

def call(number:, **options)
  n = Integer(number, exception: false)
  abort 'rubycam: preset must be 1-3' unless n && (1..3).cover?(n)
  with_obsbot(options) do |bot|
    bot.ai_mode = :no_tracking
    bot.goto_preset(n - 1)
  end
end