- if 'open.spotify.com' in match or 'spotify:' in match:
- for r in spotify_regex:
- for sptype, track in r.findall(match):
- bot.msg(chan, unescape(gotspotify(sptype, track)))
-
- elif 'youtube.com' in match or 'youtu.be' in match:
- for r in youtube_regex:
- for url in r.findall(match):
- bot.msg(chan, unescape(gotyoutube(url)))
-
- elif 'twitch.tv' in match:
- for r in twitch_regex:
- for uri in r.findall(match):
- bot.msg(chan, unescape(gottwitch(uri)))
-
- else:
- bot.msg(chan, unescape(goturl(match)))
+ response = goturl(match)
+ if response is not None:
+ bot.msg(chan, response)