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:
parent
f41030b515
commit
2a74ad11c5
4 changed files with 42 additions and 12 deletions
|
@ -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 '''
|
||||
|
|
|
@ -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 '''
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue