Sha256: 75afd360923958e9fa9c6b7f90251ade97ff477c624af68e785b2bd3f0d20ea0
Contents?: true
Size: 389 Bytes
Versions: 5
Compression:
Stored size: 389 Bytes
Contents
require 'slack-ruby-client' Slack.configure do |config| config.token = ENV['SLACK_API_TOKEN'] fail 'Missing ENV[SLACK_API_TOKEN]!' unless config.token end client = Slack::Web::Client.new client.auth_test general_channel = client.channels_list['channels'].detect { |c| c['name'] == 't3' } client.chat_postMessage(channel: general_channel['id'], text: 'Hello World', as_user: true)
Version data entries
5 entries across 5 versions & 1 rubygems