#!/usr/bin/env ruby
require 'slack-ruby-client'

Slack.configure do |config|
  config.token = ENV['SLACK_API_TOKEN']
end
client = Slack::Web::Client.new

channel_name = ARGV[0]
slash_command = ARGV[1]
message_text = ARGV[2]

channel_id = client.channels_id(channel: channel_name).channel.id
response = client.chat_command(channel: channel_id, command: slash_command, text: message_text)
pp response