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.
 

1.2 KiB

Upgrading SlackRubyBot

Upgrading to >= 0.4.0

This version uses slack-ruby-client instead of slack-ruby-gem.

The command interface now takes a client parameter, which is the RealTime Messaging API instance. Add the new parameter to all call calls in classes that inherit from SlackRubyBot::Commands::Base.

Before:

def self.call(data, match)
  ...
end

After:

def self.call(client, data, match)
  ...
end

This also applies to command, operator and match blocks.

Before:

command 'ping' do |data, match|
  ...
end

After:

command 'ping' do |client, data, match|
  ...
end

You can now send messages directly via the RealTime Messaging API.

client.message text: 'text', channel: 'channel'

Otherwise you must now pass the client parameter to send_message and send_message_with_gif.

def self.call(client, data, match)
  send_message client, data.channel, 'hello'
end
def self.call(client, data, match)
  send_message_with_gif client, data.channel, 'hello', 'hi'
end