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.
 

21 lines
439 B

module SlackRubyBot
module Config
extend self
attr_accessor :token
attr_accessor :url
attr_accessor :aliases
attr_accessor :user
attr_accessor :user_id
attr_accessor :team
attr_accessor :team_id
def names
[user, aliases, "<@#{user_id.downcase}>", "<@#{user_id.downcase}>:", "#{user}:"].compact.flatten
end
def name?(name)
name && names.include?(name.downcase)
end
end
end