Support de cocoall

This commit is contained in:
hadware
2018-06-06 04:10:36 +02:00
parent 36be3dcf75
commit db7f9393a0
+4 -7
View File
@@ -21,14 +21,11 @@ parser.add_argument('--verbose', help='print debug information', action='store_t
cococlient = CocoClient() cococlient = CocoClient()
# setting up the various dispatchers # setting up the various dispatchers
connect_cmd = CocoConnectCommand(cococlient) cmds = [cmd_class(cococlient) for cmd_class in (CocoConnectCommand, CocoMsgCommand, CocoListCommand,
msg_cmd = CocoMsgCommand(cococlient) CocoSwitchCommand, CocoQuitCommand, CocoBroadcastCommand)]
list_cmd = CocoListCommand(cococlient) help_cmd = BotHelp(cmds)
switch_cmd = CocoSwitchCommand(cococlient)
quit_cmd = CocoQuitCommand(cococlient)
help_cmd = BotHelp([connect_cmd, msg_cmd, list_cmd, switch_cmd, quit_cmd])
coco_commands = CommandsDispatcherProcessor([connect_cmd, msg_cmd, list_cmd, switch_cmd, help_cmd, quit_cmd], coco_commands = CommandsDispatcherProcessor(cmds,
"coco", default_response="de?") "coco", default_response="de?")
root_messages_dispatcher = MessageDispatcher([coco_commands]) root_messages_dispatcher = MessageDispatcher([coco_commands])