All Projects → litaio → Lita Slack

litaio / Lita Slack

Licence: mit
A Slack adapter for Lita.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Lita Slack

Hubcommander
A Slack bot for GitHub organization management -- and other things too
Stars: ✭ 1,149 (+732.61%)
Mutual labels:  slack-bot, slack, chatops
Slacker
Slack Bot Framework
Stars: ✭ 495 (+258.7%)
Mutual labels:  slack-bot, slack, chatops
Sactive Bot
😈 An extensible chat bot framework. sactive-bot is an evolution of the open source hubot project. - https://www.shipengqi.top/sactive-bot .
Stars: ✭ 212 (+53.62%)
Mutual labels:  slack-bot, slack, chatops
Norrisbot
a Slack bot that kicks asses (roundhouse-kicks to be accurate...)
Stars: ✭ 134 (-2.9%)
Mutual labels:  slack-bot, slack
Obed Bot
🍴 Obed Slack Bot, na požiadanie kontroluje aktuálnu ponuku denného menu reštaurácii. [only for slovak|czech users]
Stars: ✭ 32 (-76.81%)
Mutual labels:  slack-bot, slack
Solarthing
Monitors an Outback MATE and a Renogy Rover - MPPT Charge Controller. Integrates with Grafana, PVOutput and more!
Stars: ✭ 33 (-76.09%)
Mutual labels:  slack-bot, slack
Marvin
The paranoid bot (framework)
Stars: ✭ 51 (-63.04%)
Mutual labels:  slack-bot, slack
Busy Beaver
The Chicago Python Community Engagement Slack bot
Stars: ✭ 66 (-52.17%)
Mutual labels:  slack-bot, slack
Hanu
Golang Framework for writing Slack bots
Stars: ✭ 128 (-7.25%)
Mutual labels:  slack, chatops
Showcase Ansible Chatops
Vagrant Demo showing ChatOps with Ansible
Stars: ✭ 71 (-48.55%)
Mutual labels:  slack, chatops
Ex mustang
✨ A simple, clueless bot
Stars: ✭ 67 (-51.45%)
Mutual labels:  slack-bot, slack
Slacky
🐍 The BEST Slack Selfbot on GitHub | No Bot User, Acts Like It's You! ⭐️
Stars: ✭ 80 (-42.03%)
Mutual labels:  slack-bot, slack
Slack Ruby Client
A Ruby and command-line client for the Slack Web, Real Time Messaging and Event APIs.
Stars: ✭ 957 (+593.48%)
Mutual labels:  slack-bot, slack
Cog
Bringing the power of the command line to chat
Stars: ✭ 910 (+559.42%)
Mutual labels:  slack, chatops
Slack Block Builder
Lightweight, no-dependency JavaScript library for creating Slack Block Kit UIs, with a builder syntax, inspired by SwiftUI.
Stars: ✭ 129 (-6.52%)
Mutual labels:  slack-bot, slack
Wc2018 Slack Bot
World Cup 2018 Slack Bot
Stars: ✭ 11 (-92.03%)
Mutual labels:  slack-bot, slack
Slack Cli
Powerful Slack CLI via pure bash. Rich messaging, uploads, posts, piping, oh my!
Stars: ✭ 850 (+515.94%)
Mutual labels:  slack-bot, slack
Botonomous
A PHP Framework For Creating Autonomous Slack Bots
Stars: ✭ 109 (-21.01%)
Mutual labels:  slack-bot, slack
Torpedo
Pluggable, multi-network asynchronous chat bot written in Go
Stars: ✭ 19 (-86.23%)
Mutual labels:  slack-bot, slack
Jbot
Make Slack and Facebook Bots in Java.
Stars: ✭ 1,148 (+731.88%)
Mutual labels:  slack-bot, slack

lita-slack

Gem Version Build Status

lita-slack is an adapter for Lita that allows you to use the robot with Slack. The current adapter is not compatible with pre-1.0.0 versions, as it now uses Slack's Real Time Messaging API.

Installation

Add lita-slack to your Lita instance's Gemfile:

gem "lita-slack"

Configuration

Required attributes

Optional attributes

  • link_names (Boolean) – Set to true to turn all Slack usernames in messages sent by Lita into links.
  • parse (String) – Specify the parsing mode. See https://api.slack.com/docs/formatting#parsing_modes.
  • proxy (String) – Specify a HTTP proxy URL. (e.g. "http://squid.example.com:3128")
  • unfurl_links (Boolean) – Set to true to automatically add previews for all links in messages sent by Lita.
  • unfurl_media (Boolean) – Set to false to prevent automatic previews for media files in messages sent by Lita.

Note: When using lita-slack, the adapter will overwrite the bot's name and mention name with the values set on the server, so config.robot.name and config.robot.mention_name will have no effect.

config.robot.admins

Each Slack user has a unique ID that never changes even if their real name or username changes. To populate the config.robot.admins attribute, you'll need to use these IDs for each user you want to mark as an administrator. If you're using Lita version 4.1 or greater, you can get a user's ID by sending Lita the command users find NICKNAME_OF_USER.

Example

Lita.configure do |config|
  config.robot.adapter = :slack
  config.robot.admins = ["U012A3BCD"]

  config.adapters.slack.token = "abcd-1234567890-hWYd21AmMH2UHAkx29vb5c1Y"

  config.adapters.slack.link_names = true
  config.adapters.slack.parse = "full"
  config.adapters.slack.unfurl_links = false
  config.adapters.slack.unfurl_media = false
end

Joining rooms

Lita will join your default channel after initial setup. To have it join additional channels or private groups, simply invite it to them via your Slack client as you would any normal user.

Events

  • :connected - When the robot has connected to Slack. No payload.
  • :disconnected - When the robot has disconnected from Slack. No payload.
  • :slack_channel_created - When the robot creates/updates a channel's or group's info, as directed by Slack. The payload has a single object, a Lita::Slack::Adapters::SlackChannel object, under the :slack_channel key.
  • :slack_reaction_added - When a reaction has been added to a previous message. The payload includes :user (a Lita::User for the sender of the message in question), :name (the string name of the reaction added), :item_user (a Lita::User for the user that created the original item that has been reacted to), :item (a hash of raw data from Slack about the message), and :event_ts (a string timestamp used to identify the message).
  • :slack_reaction_removed - When a reaction has been removed from a previous message. The payload is the same as the :slack_reaction_added message.
  • :slack_user_created - When the robot creates/updates a user's info - name, mention name, etc., as directed by Slack. The payload has a single object, a Lita::Slack::Adapters::SlackUser object, under the :slack_user key.

Chat service API

lita-slack supports Lita 4.6's chat service API for Slack-specific functionality. You can access this API object by calling the Lita::Robot#chat_service. See the API docs for Lita::Adapters::Slack::ChatService for details about the provided methods.

API documentation

The API documentation, useful for plugin authors, can be found for the latest gem release on RubyDoc.info

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].