Class: DComm::CLI::Guild::Update

Inherits:
Command
  • Object
show all
Defined in:
lib/dcomm/cli/guild/update.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:, guild_id:, command_id:, command_file:) ⇒ Object



21
22
23
24
25
26
27
28
29
30
# File 'lib/dcomm/cli/guild/update.rb', line 21

def call(app_id:, guild_id:, command_id:, command_file:)
  command = YAML.safe_load_file(File.expand_path(command_file))
  response = discord.edit_guild_app_cmd(
    app_id:,
    guild_id:,
    command_id:,
    command:,
  )
  renderer.call(response)
end