- 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, 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, gotyoutube(url))
-
- elif 'twitch.tv' in match:
- for r in twitch_regex:
- for uri in r.findall(match):
- bot.msg(chan, gottwitch(uri))
-
- else:
- bot.msg(chan, goturl(match))
+ response = goturl(match)
+ if response is not None:
+ bot.msg(chan, response)