Skip to content

Instantly share code, notes, and snippets.

@myano
Created April 11, 2017 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myano/2c64ab55f8af032c56951e91cb4843e9 to your computer and use it in GitHub Desktop.
Save myano/2c64ab55f8af032c56951e91cb4843e9 to your computer and use it in GitHub Desktop.
def lovelike(jenni, input):
if input.sender in ['#reddit-baseball']:
return
if random.random() <= 0.25:
verb = input.group(1)
obj = input.group(2)
if len(obj) >= 100:
obj = obj[:100] + ' [...]'
out = 'I '
out += verb
out += ' '
out += obj
out += ', too!'
jenni.say(out)
lovelike.rule = r'(?i)i\s(love|like|hate)\s(.*)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment