Hacker News new | ask | show | jobs
by leon_ 5193 days ago
> I would write my OWN bot, that responded to TWSS with a quotation from a notable woman.

I'd write a bot that would answer with a TWSS-trigger and watch the IRC channel going up in flames :]

1 comments

You can actually use a copy of her own talkbackbot to do just that. Just wire up your own trigger like so:

    def contains_twsrs_response_quote(chat_line):
        return bool(re.search(r'~ [\w ]+$', chat_line))
Edit: This presumes the responses you're trying to detect match the form "Quote goes here ~ Author of Quote" seen in her quotes.txt.