python-zulip-api/contrib_bots/bots/helloworld/helloworld.py
derAnfaenger c6d294385f bots: Refactor bots to use send_reply.
The send_reply function makes it easier for bots
to send messages. This commit updates all bots to
make use of this function, when possible.
2017-05-24 13:16:23 -07:00

19 lines
527 B
Python

# See readme.md for instructions on running this code.
class HelloWorldHandler(object):
def usage(self):
return '''
This is a boilerplate bot that responds to a user query with
"beep boop", which is robot for "Hello World".
This bot can be used as a template for other, more
sophisticated, bots.
'''
def handle_message(self, message, client, state_handler):
content = 'beep boop'
client.send_reply(message, content)
handler_class = HelloWorldHandler