Browse Source

Made attachments work

master
Daniel Muckerman 9 years ago
parent
commit
145ed7699f
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      slack-pixiv/commands/pixiv.rb

+ 13
- 1
slack-pixiv/commands/pixiv.rb View File

@ -7,7 +7,19 @@ module SlackMathbot
#asdf #asdf
puts _match[:url] puts _match[:url]
#client.say(channel: _data.channel, text: "Testing: http://pixiv.net#{_match[:url]}") #client.say(channel: _data.channel, text: "Testing: http://pixiv.net#{_match[:url]}")
client.say(channel: _data.channel, attachments: "[{'pretext': 'pre-hello', 'text': 'text-world'}]")
client.web_client.chat_postMessage(
channel: _data.channel,
as_user: true,
attachments: [
{
fallback: "Ticket #1943: Can't rest my password - https://groove.hq/path/to/ticket/1943",
title: "Ticket #1943: Can't reset my password",
title_link: "http://www.pixiv.net" + _match[:url][1..-1],
text: "Help! I tried to reset my password but nothing happened!",
color: "#7CD197"
}
].to_json
)
#send_message client, _data.channel, "Testing: #{_match[:url]}" #send_message client, _data.channel, "Testing: #{_match[:url]}"
end end

Loading…
Cancel
Save