A Slack Bot that pulls Pixiv information and posts the full image(s) into Slack, with iOS shortcuts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
508 B

8 years ago
  1. # coding: utf-8
  2. module SlackMathbot
  3. module Commands
  4. class Pixiv < SlackRubyBot::Commands::Base
  5. match /pixiv\.net(?<url>.*)$/ do |client, _data, _match|
  6. #asdf
  7. puts _match[:url]
  8. #client.say(channel: _data.channel, text: "Testing: http://pixiv.net#{_match[:url]}")
  9. client.say(channel: _data.channel, attachments: "[{'pretext': 'pre-hello', 'text': 'text-world'}]")
  10. #send_message client, _data.channel, "Testing: #{_match[:url]}"
  11. end
  12. end
  13. end
  14. end