Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lita-imgflip-memes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lita-imgflip-memes

  • 1.1.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

lita-imgflip-memes

Gem Build Status Coverage Status

Add imgflip meme generation to your Lita bot!

ancient aliens guy saying 'chat bots'

Installation

Add lita-imgflip-memes to your Lita instance's Gemfile:

gem "lita-imgflip-memes"

Configuration

The 'lita way' to do this is to open up your lita_config.rb and set up file-based configuration:

config.handlers.imgflip_memes.api_user = 'myusername'
config.handlers.imgflip_memes.api_password = 'mypassword'

I have set up this gem to deafult to the following environment variables if the config entries aren't set in lita_config.rb:

  ENV['IMGFLIP_API_USER']
  ENV['IMGFLIP_API_PASSWORD']

Adding new memes to your local Lita bot

On a suggestion from @joshwlewis I've added a way to put new memes in your Lita bot without having to monkey patch this gem. Add them to your lita_config.rb with the add_meme method:

Lita::Handlers::ImgflipMemes.add_meme(
  template_id: 61546,
  pattern: /(brace yoursel[^\s]+) (.*)/i,
  help: 'brace yourselves, <text>')

Note that the pattern needs to be a regex and it needs to capture two strings. If you don't have two pairs of parens in your regex you're gonna have a bad time.

Usage

Lita > lita aliens chatbots
http://i.imgflip.com/1tzqwt.jpg

FAQs

Package last updated on 04 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc