lib/hibot/plugins/spotify.rb in hibot-0.0.1 vs lib/hibot/plugins/spotify.rb in hibot-0.0.2
- old
+ new
@@ -1,15 +1,14 @@
module Hibot
class Spotify
include Cinch::Plugin
include API::Spotify
- match "search", method: :search
+ match /ssearch/, {method: :query}
match API::Spotify::URI_REGEX, {method: :parse, use_prefix: false}
- def search(m)
- # Search on the message without !search and without any trailing spaces
- result = search(m.message.gsub('!search', '').split)
+ def query(m)
+ result = search(m.message)
m.reply result
end
def parse(m)
parsed_uri = parse_uri(m.message)
\ No newline at end of file