docs: def cmd(send, msg, args):
      """Handles voting.
  
      Syntax: {command} <start|end|list|tally|edit|delete|retract|reopen|(num) vote>
  
      """
      command = msg.split()
      msg = " ".join(command[1:])
      if not command:
          send("Which poll?")
          return
      else:
          command = command[0]
      # FIXME: integrate this with ArgParser
      if command.isdigit():
          if args['type'] == 'privmsg':
              send("We don't have secret ballots in this benevolent dictatorship!")
          else:
              send(vote(args['db'], args['nick'], int(command), msg))
          return
      isadmin = args['is_admin'](args['nick'])
      parser = arguments.ArgParser(args['config'])
      parser.set_defaults(session=args['db'], msg=msg, nick=args['nick'])
      subparser = parser.add_subparsers()
      start_parser = subparser.add_parser('start', config=args['config'], aliases=['open', 'add', 'create'])
      start_parser.set_defaults(func=start_poll, send=send, isadmin=isadmin, type=args['type'])
      tally_parser = subparser.add_parser('tally')
      tally_parser.set_defaults(func=tally_poll, send=send)
      list_parser = subparser.add_parser('list', config=args['config'])
      list_parser.set_defaults(func=list_polls)
      retract_parser = subparser.add_parser('retract')
      retract_parser.set_defaults(func=retract)
      end_parser = subparser.add_parser('end', aliases=['close'])
      end_parser.set_defaults(func=end_poll, isadmin=isadmin)
      delete_parser = subparser.add_parser('delete')
      delete_parser.set_defaults(func=delete_poll, isadmin=isadmin)
      edit_parser = subparser.add_parser('edit')
      edit_parser.set_defaults(func=edit_poll, isadmin=isadmin)
      reopen_parser = subparser.add_parser('reopen')
      reopen_parser.set_defaults(func=reopen, isadmin=isadmin)
      try:
          cmdargs = parser.parse_args(command)
      except arguments.ArgumentException as e:
          send(str(e))
          return
      send(cmdargs.func(cmdargs))