LoginSignup
0
1

More than 5 years have passed since last update.

ruby3行で輝夜月ちゃんがslack通知

Posted at
slack
require 'net/http'
require 'uri'
require 'json'

slack_webhook_key = URI.parse("https://hooks.slack.com/services/hogehhogeasdfafdajkdshfalksfh")

send_data = {
  text: "おはよおおおお!こんにちわああ!こんばんわああああ!おきてえええええ!" ,
  channel: "hoge",
  username: "輝夜月",
  icon_emoji: ":kaguya_runa:"
}.to_json

Net::HTTP.post_form(slack_webhook_key, { payload: send_data })
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1