e8f88b2ee1
Add a new 'subscribe' command which allows people to subscribe for automatic notifications via direct message of topics which match the subscription regex they provide. With no regex argument it shows the user's current subscription (if any). Also add a new 'unsubscribe' command for clearing the regex. Example use cases: 1. I know that nova is planning to discuss $TOPIC some time tomorrow but they don't know exactly when, and I want to spend most of the day in another room whilst ensuring I don't miss that particular discussion on $TOPIC => "/msg ptgbot subscribe $TOPIC" will give me notifications when the PTL types "#nova next $TOPIC" and "#nova now $TOPIC". 2. I'm interested in *all* discussion on Python 3. I don't know which projects are planning to discuss it, let alone when, but that doesn't matter, because I can type "/msg ptgbot subscribe python ?3" and get notified of all Python 3 discussions. As with the presence tracking commands, these commands can be used in public channels by preceding them with a '#' character. Change-Id: I3f51acc318ecf31d435768640cef6c46d8ca136c |
||
---|---|---|
.. | ||
__init__.py | ||
bot.py | ||
db.py |