Method: Slack::Endpoint::Chat#chat_postMessage
- Defined in:
- lib/slack/endpoint/chat.rb
#chat_postMessage(options = {}) ⇒ Object
Sends a message to a channel.
116 117 118 119 120 121 |
# File 'lib/slack/endpoint/chat.rb', line 116 def chat_postMessage(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? throw ArgumentError.new("Required arguments :text or :attachments missing") if [:text].nil? && [:attachments].nil? [:attachments] = [:attachments].to_json if [:attachments].is_a?(Array) || [:attachments].is_a?(Hash) post("chat.postMessage", ) end |