mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
bots: Move contrib_bots to api/bots*.
This will make it convenient to include these bots in Zulip API releases on pypi. Fix #5009.
This commit is contained in:
committed by
Tim Abbott
parent
d36e528fdd
commit
db9918f3d6
18
api/bots/helloworld/helloworld.py
Normal file
18
api/bots/helloworld/helloworld.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user