lib/lita/handlers/boardgamegeek.rb in lita-boardgamegeek-0.1.0 vs lib/lita/handlers/boardgamegeek.rb in lita-boardgamegeek-0.1.1
- old
+ new
@@ -1,10 +1,13 @@
require 'bgg-api'
module Lita
module Handlers
class Boardgamegeek < Handler
- route(/bgg(?: me)?\s+(.+)/, :search, command: true)
+ route(/bgg(?: me)?\s+(.+)/, :search, command: true, help: {
+ "bgg GAME" => "returns link to BGG entry for GAME",
+ "bgg me GAME" => "returns link to BGG entry for GAME"
+ })
def search(response)
term = response.match_data[1]
id = game_id(term)
response.reply "#{term}: http://www.boardgamegeek.com/boardgame/#{id}"