zulip_bots: Make StateHandler optional.

This has the convenient side-effect of making
the bot_handler.storage attribute read-only.
This commit is contained in:
derAnfaenger 2017-11-13 11:49:23 +01:00 committed by showell
parent f41030b515
commit 2a74ad11c5
4 changed files with 42 additions and 12 deletions

View file

@ -2,6 +2,11 @@
class IncrementorHandler(object):
META = {
'name': 'Incrementor',
'description': 'Example bot to test the update_message() function.',
'uses_storage': True,
}
def usage(self):
return '''

View file

@ -267,6 +267,11 @@ class ticTacToeHandler(object):
tic-tac-toe bot! Make sure your message starts with
"@mention-bot".
'''
META = {
'name': 'TicTacToe',
'description': 'Lets you play Tic-tac-toe against a computer.',
'uses_storage': True,
}
def usage(self):
return '''

View file

@ -4,6 +4,12 @@ import re
import os
class VirtualFsHandler(object):
META = {
'name': 'VirtualFs',
'description': 'Provides a simple, permanent file system to store and retrieve strings.',
'uses_storage': True,
}
def usage(self):
return get_help()