     if data and callback and data.length > 0
       callback(if data.length == 1 then data[0] else data[Math.floor(Math.random() * data.length)])
 
+  getUriFromResult: (result) ->
+    result.images.original.url
+
   getSearchUri: (state) ->
-    @log "getSearchUri:", state
+    @log 'getSearchUri:', state
     if state.args and state.args.length > 0
       options = merge {
         q: state.args,

      when Giphy.HelpName then @getHelp state
      else @error state.msg, "Unrecognized Endpoint: #{state.endpoint}"

  sendResponse: (state) ->
    @log "sendResponse:", state
    if state.uri
      @sendMessage state.msg, state.uri
    else

      }

  match: (input) ->
    @log 'match:', input
    Giphy.regex.exec input or ''

  getEndpoint: (state) ->
    @log 'getEndpoint:', state
    match = @match state.input

    if match
