Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def episode(phenny, input):
- """Finds MLP Episodes. Commands can be .ep season 2 episode 1 or .ep episode 27 or .ep next or .ep last"""
- query = input.group(2)
- if not query: return phenny.reply('.ep what?')
- uri = urban_dictionary_search(query, phenny)
- if uri:
- if uri.startswith('nope'):
- uris = uri.split('$')
- phenny.say("Sorry " + input.nick + ", I couldn't find the " + uris[1] + " episode."
- else:
- phenny.say("Here's what I got, " + input.nick + ": " + uri)
- if not hasattr(phenny.bot, 'last_seen_uri'):
- phenny.bot.last_seen_uri = {}
- phenny.bot.last_seen_uri[input.sender] = uri
- else: phenny.say("Sorry " + input.nick + ", I couldn't find any episodes for '%s'." % query)
- urban_dictionary.commands = ['ep','episode']
Advertisement
Add Comment
Please, Sign In to add comment