Class: DComm::CLI::Apply

Inherits:
Command
  • Object
show all
Defined in:
lib/dcomm/cli/apply.rb

Instance Attribute Summary

Attributes inherited from Command

#discord, #renderer

Instance Method Summary collapse

Methods inherited from Command

#initialize

Constructor Details

This class inherits a constructor from DComm::CLI::Command

Instance Method Details

#call(app_id:, commands_file:) ⇒ Object



18
19
20
21
22
# File 'lib/dcomm/cli/apply.rb', line 18

def call(app_id:, commands_file:)
  commands = YAML.safe_load_file(File.expand_path(commands_file))
  response = discord.apply_global_app_cmds(app_id:, commands:)
  renderer.call(response)
end