Commit graph

11 commits

Author SHA1 Message Date
derAnfaenger 45e0f77298 bots: Allow bots to update messages. 2017-05-24 11:01:46 -07:00
Abhijeet Kaur 63efed5c73 Refactor: Make StateHandler() function independent.
This refactor makes the nested class 'StateHandler' in the
file /contrib_bots/bot_lib.py independent class. It previously
was nested in 'run_message_handler_for_bot' function.

This is done to write a cleaner test file for contrib_bots using
mock library.
2017-05-23 20:42:09 -07:00
neiljp bd37161ece Factor out send_reply functionality into bot_lib 2017-05-23 12:40:08 -07:00
Tim Abbott 657478cfc5 bot_lib: Fix indentation. 2017-05-23 08:17:22 -07:00
derAnfaenger 81cd41da17 bots: Strip leading whitespaces from bot queries. 2017-05-22 19:13:42 -07:00
derAnfaenger 374c80d86a bots: Clarify message handling for @-mentions. 2017-05-22 19:13:42 -07:00
derAnfaenger 60d4c343d7 bots: Allow empty bot queries.
This commit allows bots to be adressed with empty queries,
that is, by just @-mentioning them. @-mentioning is now the
only way to adress a bot.
2017-05-22 19:13:42 -07:00
Abhijeet Kaur 9a8dc7c622 Remove triage_message() function from all the contrib-bots.
To make all bots consistent add shared function in bot_lib.py
to check if this bot is called. All bots respond to at-mention of
the bot instead of their specific names.
2017-02-17 06:51:48 -08:00
Tim Abbott 55e8d5f58d lint: Clean up E123 PEP-8 rule. 2017-01-23 21:34:26 -08:00
Tim Abbott 4b015ecdff lint: clean up PEP-8 W391 rule. 2017-01-23 20:39:02 -08:00
Steve Howell 8295d6775d Extract contrib_bots/bot_lib.py from run.py.
Splitting out some of the bot functions into a library
will make it easier for heavily customized bots to have
their own version of run.py, instead of the shared one
that we use for everyone now.  If they use bot_lib.py
directly, they will still most likely conform to
the "Handler" interface as long as they call
run_message_handler_for_bot.

Most bots should continue to use contrib_bots/run.py
for now.
2017-01-14 12:44:50 -08:00