Support de cocoall
This commit is contained in:
+4
-7
@@ -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])
|
||||||
|
|||||||
Reference in New Issue
Block a user