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

9 years ago
  1. module SlackRubyBot
  2. module Config
  3. extend self
  4. attr_accessor :token
  5. attr_accessor :url
  6. attr_accessor :aliases
  7. attr_accessor :user
  8. attr_accessor :user_id
  9. attr_accessor :team
  10. attr_accessor :team_id
  11. def names
  12. [user, aliases, "<@#{user_id.downcase}>", "<@#{user_id.downcase}>:", "#{user}:"].compact.flatten
  13. end
  14. def name?(name)
  15. name && names.include?(name.downcase)
  16. end
  17. end
  18. end